Show More
Commit Description:
force log out when password change
Commit Description:
force log out when password change
References:
File last commit:
Show/Diff file:
Action:
node_modules/falafel/test/es6.js
| 17 lines
| 563 B
| application/javascript
| JavascriptLexer
|
r789 | var falafel = require('../'); | |||
var test = require('tape'); | ||||
var semver = require('semver'); | ||||
// it runs the generator so needs node 4+ | ||||
test('generators', { skip: semver.satisfies(process.version, '< 4.0.0') }, function (t) { | ||||
t.plan(1); | ||||
var src = 'console.log((function * () { yield 3 })().next().value)'; | ||||
var output = falafel(src, { ecmaVersion: 6 }, function (node) { | ||||
if (node.type === 'Literal') { | ||||
node.update('555'); | ||||
} | ||||
}); | ||||
Function(['console'],output)({log:log}); | ||||
function log (n) { t.equal(n, 555) } | ||||
}); | ||||