How to use the sinon-test.configureTestCase function in sinon-test

To help you get started, we’ve selected a few sinon-test examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dadi / web / test / unit / cache.js View on Github external
var path = require("path")
var should = require("should")

var sinon = require("sinon")
var sinonTest = require("sinon-test")

sinon.test = sinonTest.configureTest(sinon)
sinon.testCase = sinonTest.configureTestCase(sinon)

var api = require(__dirname + "/../../dadi/lib/api")
var Server = require(__dirname + "/../help").Server
var cache = require(__dirname + "/../../dadi/lib/cache")
var datasource = require(__dirname + "/../../dadi/lib/datasource")
var page = require(__dirname + "/../../dadi/lib/page")
var TestHelper = require(__dirname + "/../help")()
var config = require(path.resolve(path.join(__dirname, "/../../config")))

describe("Cache", function(done) {
  beforeEach(function(done) {
    TestHelper.resetConfig().then(() => {
      done()
    })
  })

sinon-test

<a href="CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant" /></a>

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

73 / 100
Full package analysis