feat: promise support for drops, working on #65

This commit is contained in:
Jun Yang
2019-03-10 18:05:52 +08:00
parent ad0930f152
commit 4a8088d4e4
25 changed files with 260 additions and 250 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ describe('Value', function () {
})
describe('#value()', function () {
it('should call chained filters correctly', function () {
it('should call chained filters correctly', async function () {
const date = sinon.stub().returns('y')
const time = sinon.spy()
Filter.register('date', date)
@@ -108,7 +108,7 @@ describe('Value', function () {
const scope = new Scope({
foo: { bar: 'bar' }
})
tpl.value(scope)
await tpl.value(scope)
expect(date).to.have.been.calledWith('bar', 'b')
expect(time).to.have.been.calledWith('y', 2)
})