mirror of
https://github.com/google/pebble.git
synced 2025-07-05 06:10:27 -04:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
24
third_party/jerryscript/js_tooling/tests/test_js_tooling.js
vendored
Normal file
24
third_party/jerryscript/js_tooling/tests/test_js_tooling.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* eslint-env mocha */
|
||||
/* eslint func-names: 0 */
|
||||
|
||||
const assert = require('assert');
|
||||
const path = require('path');
|
||||
const unroll = require('unroll');
|
||||
unroll.use(it);
|
||||
|
||||
const fs = require('fs');
|
||||
const jsCompiler = require('../_js_tooling.js');
|
||||
|
||||
describe('js_tooling.js', () => {
|
||||
unroll('compiles #filename with #expectedResult', (done, fixture) => {
|
||||
var js_file = path.join('fixtures', fixture.filename);
|
||||
var js = fs.readFileSync(js_file, 'utf8');
|
||||
const result = jsCompiler.createSnapshot(js);
|
||||
assert.equal(result.result, fixture.expectedResult);
|
||||
done();
|
||||
}, [
|
||||
['filename', 'expectedResult'],
|
||||
['multiple-emojis.js', 'success'],
|
||||
['syntax-error.js', 'error']
|
||||
]);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue