Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix a syntax error in test #351

Closed
wants to merge 1 commit into from

Conversation

romandev
Copy link
Contributor

npm test command has been failed in old version node.js since
introducing bitint tests. The problem is caused that old version V8
doesn't support the bigint syntax(e.g. 11n, 22n). So, we just wrap the
syntax using eval() method to avoid the problem.

/home/jinho_bang/up/test/typedarray.js:81
t[3] = 11n;
^^

SyntaxError: Invalid or unexpected token
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at testModules.forEach.name (/home/jinho_bang/up/test/index.js:54:5)

Fixes: #349

@romandev
Copy link
Contributor Author

@mhdawson, @NickNaso PTAL (This is a follow-up patch after #350)

`npm test` command has been failed in old version node.js since
introducing `bitint` tests. The problem is caused that old version V8
doesn't support the bigint syntax(e.g. 11n, 22n). So, we just wrap the
syntax using `eval()` method to avoid the problem.

/home/jinho_bang/up/test/typedarray.js:81
      t[3] = 11n;
             ^^

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at testModules.forEach.name (/home/jinho_bang/up/test/index.js:54:5)

Fixes: nodejs#349
@mhdawson
Copy link
Member

@romandev I've been updating #350, and it now includes a fix for this problem.

@romandev
Copy link
Contributor Author

@mhdawson okay, thanks :) I'll close this PR

@romandev romandev closed this Sep 20, 2018
@mhdawson
Copy link
Member

Sorry for not making it clearer I was still working on it, but since you've looked at the problem it would be great if you reviewed #350.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants