From 67ac91815bbbe7f007308696d851bd870aaea4ab Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Mon, 16 Mar 2015 08:40:32 -0700 Subject: [PATCH 1/3] Add a test for the this-spread fix in 976e8c1. Addresses #1033. --- .../transformation/es6-spread/this-context/actual.js | 6 ++++++ .../transformation/es6-spread/this-context/expected.js | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/fixtures/transformation/es6-spread/this-context/actual.js create mode 100644 test/fixtures/transformation/es6-spread/this-context/expected.js 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); + } +}; From 76301a771371fd453dbb071e3cb65ede20cab4c1 Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Mon, 16 Mar 2015 08:43:45 -0700 Subject: [PATCH 2/3] Fix grammar. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe57e3c3c6..a77bfaceab 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`: From b07341a1f7de4dc4c8d5b43f79a2e5f35afd23a0 Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Mon, 16 Mar 2015 08:45:05 -0700 Subject: [PATCH 3/3] Add a note about using the `--grep` option to focus test runs. --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a77bfaceab..615a5bf423 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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