tests for async
This commit is contained in:
Родитель
71a1f741d4
Коммит
b24dbe96f7
|
@ -1,4 +1,7 @@
|
|||
const req = require.context(".", true, /\.test.js$/);
|
||||
const files = req.keys();
|
||||
const chai = require("chai");
|
||||
chai.use(require("chai-as-promised"));
|
||||
chai.should();
|
||||
|
||||
files.forEach(file => req(file));
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
const should = require('chai').should();
|
||||
const async = require('lib/async');
|
||||
const {expect} = require("chai");
|
||||
const async = require("lib/async");
|
||||
|
||||
describe("async API", () => {
|
||||
it("should reject when invoked with no arguments.", () => {
|
||||
var test = async();
|
||||
console.log(test.should);
|
||||
return test().should.be.rejected;
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче