test(template): from Jest to test (#6499)
This commit is contained in:
parent
c830a0b208
commit
dc3446d61a
@ -1,7 +1,8 @@
|
||||
/* eslint-env jest */
|
||||
|
||||
'use strict'
|
||||
|
||||
const { it } = require('test')
|
||||
const assert = require('assert').strict
|
||||
|
||||
const { compileTemplate } = require('.')
|
||||
|
||||
it("correctly replaces the template's variables", () => {
|
||||
@ -10,5 +11,5 @@ it("correctly replaces the template's variables", () => {
|
||||
'{constant}': 1235,
|
||||
'%': (_, i) => i,
|
||||
})
|
||||
expect(replacer({ name: 'bar' }, 5)).toBe('bar_{property}_\\bar_1235_5_FOO')
|
||||
assert.strictEqual(replacer({ name: 'bar' }, 5), 'bar_{property}_\\bar_1235_5_FOO')
|
||||
})
|
@ -21,6 +21,10 @@
|
||||
"lodash": "^4.17.15"
|
||||
},
|
||||
"scripts": {
|
||||
"postversion": "npm publish --access public"
|
||||
"postversion": "npm publish --access public",
|
||||
"test": "node--test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"test": "^3.2.1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user