refactor: import rollup

This commit is contained in:
harttle
2018-08-20 23:58:41 +08:00
parent 4ece4e208f
commit bc9d8f92af
82 changed files with 8589 additions and 3963 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
const chai = require('chai')
const expect = chai.expect
let lexical = require('../src/lexical.js')
const lexical = require('../src/lexical.js')
describe('lexical', function () {
it('should test filter syntax', function () {
@@ -105,26 +105,26 @@ describe('lexical', function () {
})
it('should throw if non-literal', function () {
let fn = () => lexical.parseLiteral('a')
const fn = () => lexical.parseLiteral('a')
expect(fn).to.throw("cannot parse 'a' as literal")
})
})
describe('.matchValue()', function () {
it('should match -5-5', function () {
let match = lexical.matchValue('-5-5')
const match = lexical.matchValue('-5-5')
expect(match && match[0]).to.equal('-5-5')
})
it('should match 4-3', function () {
let match = lexical.matchValue('4-3')
const match = lexical.matchValue('4-3')
expect(match && match[0]).to.equal('4-3')
})
it('should match 4-3', function () {
let match = lexical.matchValue('4-3')
const match = lexical.matchValue('4-3')
expect(match && match[0]).to.equal('4-3')
})
it('should match var-1', function () {
let match = lexical.matchValue('var-1')
const match = lexical.matchValue('var-1')
expect(match && match[0]).to.equal('var-1')
})
})