refactor: switch Context <-> Scope concepts

This commit is contained in:
harttle
2019-03-25 10:36:23 +08:00
parent 76345a64c3
commit 45e3c2bb8e
34 changed files with 272 additions and 272 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import * as chai from 'chai'
import * as sinonChai from 'sinon-chai'
import * as sinon from 'sinon'
import Scope from '../../../src/scope/scope'
import Context from '../../../src/context/context'
import { Filter } from '../../../src/template/filter/filter'
import Value from '../../../src/template/value'
@@ -105,7 +105,7 @@ describe('Value', function () {
Filter.register('date', date)
Filter.register('time', time)
const tpl = new Value('foo.bar | date: "b" | time:2', false)
const scope = new Scope({
const scope = new Context({
foo: { bar: 'bar' }
})
await tpl.value(scope)