uci-mqtt/test/apromise.test.js

20 lines
440 B
JavaScript

'use strict'
const chai = require('chai'),
chaiAsPromised = require("chai-as-promised"),
lib = require('../')
chai.use(chaiAsPromised);
const expect = chai.expect
describe('Promise Stuff - ', function () {
it('Can test a promise', function () {
return expect(lib.apromise).to.eventually.equal('some promise hey')
return Promise.resolve().then(() => expect(lib.apromise).to.eventually.equal('some promise hey'))
})
})