diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe57e3c3c6..615a5bf423 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ $ make test ``` This will usually take around two minutes as it's compiling the entire -[test262](https://github.com/tc39/test262) test suite and validating it's AST. +[test262](https://github.com/tc39/test262) test suite and validating its AST. This is mostly overkill and you can limit the tests to a select few by directly running them with `mocha`: @@ -40,6 +40,12 @@ running them with `mocha`: $ mocha test/transformation.js ``` +Use mocha's `--grep` option to run a subset of tests by name: + +```sh +$ mocha test/transformation.js --grep es7 +``` + #### Workflow * Fork the repository diff --git a/test/fixtures/transformation/es6-spread/this-context/actual.js b/test/fixtures/transformation/es6-spread/this-context/actual.js new file mode 100644 index 0000000000..9473736d36 --- /dev/null +++ b/test/fixtures/transformation/es6-spread/this-context/actual.js @@ -0,0 +1,6 @@ +var obj = { + foo: function foo() { + this.bar(...arguments) + this.blah(...arguments) + } +} diff --git a/test/fixtures/transformation/es6-spread/this-context/expected.js b/test/fixtures/transformation/es6-spread/this-context/expected.js new file mode 100644 index 0000000000..3a9d917b5a --- /dev/null +++ b/test/fixtures/transformation/es6-spread/this-context/expected.js @@ -0,0 +1,8 @@ +"use strict"; + +var obj = { + foo: function foo() { + this.bar.apply(this, arguments); + this.blah.apply(this, arguments); + } +};