uci-mqtt/test/apromise.test.js

20 lines
494 B
JavaScript
Raw Normal View History

2018-04-05 15:50:39 -07:00
import changeme from '../src/changeme'
import path from 'path'
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
2017-01-16 17:05:24 -08:00
2018-04-05 15:50:39 -07:00
const { assert } = chai;
2017-01-16 17:05:24 -08:00
chai.use(chaiAsPromised);
const expect = chai.expect
describe('Promise Stuff - ', function () {
it('Can test a promise', function () {
2018-04-05 15:50:39 -07:00
return expect(changeme.apromise).to.eventually.equal('some promise hey')
return Promise.resolve().then(() => expect(changeme.apromise).to.eventually.equal('some promise hey'))
2017-01-16 17:05:24 -08:00
})
})