Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
* Copyright (c) 2017, Hugo Freire .
*
* This source code is licensed under the license found in the
* LICENSE.md file in the root directory of this source tree.
*/
const _ = require('lodash')
const Promise = require('bluebird')
const td = require('testdouble')
td.config({ promiseConstructor: Promise, ignoreWarnings: true })
require('testdouble-jest')(td, jest)
afterEach(() => td.reset())
global._ = _
global.Promise = Promise
global.td = td
td.replace('brakes') // TODO: https://github.com/jasmine/jasmine/issues/1469
/*
* Copyright (c) 2017, Hugo Freire .
*
* This source code is licensed under the license found in the
* LICENSE.md file in the root directory of this source tree.
*/
const Promise = require('bluebird')
const chai = require('chai')
chai.use(require('chai-as-promised'))
chai.config.includeStack = true
const td = require('testdouble')
td.config({
promiseConstructor: Promise,
ignoreWarnings: true
})
global.should = chai.should()
global.td = td
/*
* Copyright (c) 2017, Hugo Freire .
*
* This source code is licensed under the license found in the
* LICENSE.md file in the root directory of this source tree.
*/
const _ = require('lodash')
const Promise = require('bluebird')
const chai = require('chai')
chai.use(require('chai-as-promised'))
chai.config.includeStack = true
const td = require('testdouble')
td.config({
promiseConstructor: Promise,
ignoreWarnings: true
})
global._ = _
global.Promise = Promise
global.should = chai.should()
global.td = td
import td from 'testdouble'
import Promise from 'bluebird'
td.config({ promiseConstructor: Promise, ignoreWarnings: true })
export default td