mirror of
https://github.com/lucaspalomodevelop/JSSTE.git
synced 2026-03-19 10:04:34 +00:00
Merge branch 'test' into main
This commit is contained in:
commit
95064af162
1154
package-lock.json
generated
1154
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
"description": "JSTF is a NodeJS-Module for rendering data in static HTML",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"test": "mocha",
|
||||
"start": " node .\\src\\index.js"
|
||||
},
|
||||
"repository": {
|
||||
@ -19,5 +19,10 @@
|
||||
"homepage": "https://github.com/lucaspalomodevelop/JSTE#readme",
|
||||
"dependencies": {
|
||||
"jsdom": "^16.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"assert": "^2.0.0",
|
||||
"chai": "^4.3.4",
|
||||
"mocha": "^8.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
13
test/test.js
Normal file
13
test/test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const JSTE = require("../");
|
||||
var assert = require('assert');
|
||||
var expect = require('chai').expect;
|
||||
var should = require('chai').should();
|
||||
|
||||
describe('test VARS', function() {
|
||||
it('should retrun EXAMPLE', function() {
|
||||
var result = JSTE.render({'VAR':'EXAMPLE'},"<[VAR]>");
|
||||
result.should.equal("EXAMPLE");
|
||||
});
|
||||
});
|
||||
|
||||
console.log()
|
||||
Loading…
x
Reference in New Issue
Block a user