我正在尝试使用Coffeescript中的Jasmine但是当我在终端中调用jasmine
时,我收到此错误:
/home/luca/tries/sourcemaps-demo/spec/mainSpec.coffee:1
nction (exports, require, module, __filename, __dirname) { describe 'A suite',
^^^^^^^^^
SyntaxError: Unexpected string
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /home/luca/.nvm/v0.10.35/lib/node_modules/jasmine/lib/jasmine.js:63:5
at Array.forEach (native)
at Jasmine.loadSpecs (/home/luca/.nvm/v0.10.35/lib/node_modules/jasmine/lib/jasmine.js:62:18)
at Jasmine.execute (/home/luca/.nvm/v0.10.35/lib/node_modules/jasmine/lib/jasmine.js:145:8)
这是我的spec / support / jasmine.json:
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.coffee"
],
"helpers": [
"helpers/**/*.coffee"
]
}
这是我的spec / mainSpec.coffee:
describe 'A suite', ->
it 'should return true', ->
expect(true).toBe true
我错过了什么?
答案 0 :(得分:1)
echo $krtnum2;
if ($krtnum2 < 10) {
echo $krtnum2;
$kaart2 = 102020 . $krtnum2;
echo "length is 1 digit, cardnumber is: ";
echo $kaart2;
} else {
echo $krtnum2;
$kaart2 = 10202 . $krtnum2;
echo "length is 2 digits, cardnumber is: ";
echo $kaart2;
}
不支持jasmine
。如果您想在coffee-script
中编写测试,请使用coffee-script
jasmine-node