-
Notifications
You must be signed in to change notification settings - Fork 946
Add test runner script #3419
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 runner script #3419
Conversation
💥 No ChangesetLatest commit: a7991c7 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
Binary Size ReportAffected SDKs
Test Logs
|
e4bf2e9
to
7ecfec8
Compare
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
var __assign = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to mark this file as generated code? I started writing a whole bunch of comments on this and then only realized later that you hadn't written this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the build rule to run these through terser
, which should make this more obvious.
const nyc = resolve(__dirname, '../../../node_modules/.bin/nyc'); | ||
const mocha = resolve(__dirname, '../../../node_modules/.bin/mocha'); | ||
|
||
const env: { [key: string]: string } = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems way over complicated. spawn
defaults to using the current environment, so just changing the environment of this process prepares the environment for the child.
const env = process.env;
env.TS_NODE_CACHE = 'NO';
env.TS_NODE_COMPILER_OPTIONS = '{"module":"commonjs"}';
If that's not possible, it seems like it's worth a comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works as is. Thanks for the simplification.
…js-sdk into mrschmidt/testrunners
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
By popular demand this PR cleans up our
package.json
by adding a test runner script that makes it much easier to specify the arguments for the Node test runner.All *.js files are generated.