mirror of
https://github.com/lucaspalomodevelop/JSSTE.git
synced 2026-03-12 23:17:22 +00:00
create test
This commit is contained in:
parent
343ba11d06
commit
e6c762be9c
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"
|
||||
}
|
||||
}
|
||||
|
||||
15
test/test.js
Normal file
15
test/test.js
Normal file
@ -0,0 +1,15 @@
|
||||
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]>");
|
||||
// var result = "EXAMPLE";
|
||||
console.log("result =" +result);
|
||||
result.should.equal("EXAMPLE");
|
||||
});
|
||||
});
|
||||
|
||||
console.log()
|
||||
Loading…
x
Reference in New Issue
Block a user