mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-17 05:10:40 -07:00
refactor: import rollup
This commit is contained in:
+6
-6
@@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user