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

Add test for object spread syntax #1798

Merged
merged 1 commit into from
Jan 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"browser-unpack": "^1.1.1",
"coffee-script": "~1.10.0",
"coffeeify": "~1.1.0",
"has-object-spread": "^1.0.0",
"has-template-literals": "^1.0.0",
"isstream": "^0.1.2",
"make-generator-function": "^1.1.0",
Expand Down
14 changes: 14 additions & 0 deletions test/spread.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var browserify = require('../');
var test = require('tap').test;
var vm = require('vm');
var hasObjectSpread = require('has-object-spread')();

test('yield', { skip: !hasObjectSpread }, function (t) {
t.plan(2);
var b = browserify(__dirname + '/spread/main.js');

b.bundle(function (err, src) {
t.error(err);
t.notEqual(src.indexOf('...b'), -1, 'passed through spread syntax')
});
});
1 change: 1 addition & 0 deletions test/spread/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var a = { ...b }