-
Notifications
You must be signed in to change notification settings - Fork 28
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
Run Test262 tests against production artifacts. #41
Conversation
56e077f
to
51604b3
Compare
This relies on tc39/proposal-temporal#1801, which is the cleanest way I can think of to allow other Temporal implementations to re-use the Test262 test setup from the proposal. Long-term, is it expected that the 262 test still live in that repo or will they be copied out to some standard repo? |
They'll be copied into https://github.com/tc39/test262 as soon as all of the Mocha-style tests have been converted to use the test262 style. |
I've merged in #42 into this draft PR, but will rebase these changes later once it's merged into main, as the some of tests in the proposal repo need those changes to pass. There's 6 failing tests that I'm trying to look into, but I could definitely use some pointers on how to efficiently debug them. Is there a way to force the tests to run on CI even for draft PR's? This should generate logs that might be useful to help guide my fixing. :) |
@Ms2ger just merged that PR this morning (Thanks!), which may make it easier to finish this PR.
I think it's fine to convert from draft to normal PR if that makes it easier. But I did find a bunch of people documenting how to prevent tests from being run on draft PRs, which implies to me that there must be (or at least must have been!) a way to run GH Actions on a draft PR. |
Are those failures related to tc39/proposal-temporal#1811 ? |
I don't think so - though those also show up. These 6 failures are different. I managed to get the CI working, but the logs seem to be truncated, so here's what I see when I run the tests locally:
|
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
I got inspired to make debugging easier, so if you use the VS Code debugger, #46 will provide one-click debugging support in the IDE for both Demitasse and Test262 tests. The latter will require tc39/proposal-temporal#1812 Once the tests can be stepped through in the debugger, it made them easier to understand what's going on! I only looked at one of the failures ( |
BTW, one thing it'd be great to fix before merging this: when the proposal-temporal code is brought over to run tests, it causes error modals to show up in VSCode because there's some conflict in ESLint and Prettier. Here's the error I get any time I open or edit a file inside the
I assume there must be some setting to prevent this. Maybe revising to eslint/prettier ignore files or configs in this repo? If not, then I assume we can always apply changes after merging in the proposal-temporal code, e.g. removing or changing proposal-temporal's eslint and/or prettier configs as a patch after merging? Regardless, I really don't want to deal with those annoying dialogs every day! BTW, changing the annoying modal dialog UI (for all ESLint crashes, not just this one) is tracked at microsoft/vscode-eslint#1238. So it's possible this might get "fixed" without us having to change anything. But the last I heard, the plugin maintainer is not on board with changing this behavior. So I think we should assume that we'll have to fix on our end. |
BTW, here's the full call stack of the ESLint error above. Maybe it's the ignore files themselves which might be conflicting?
|
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in #41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
It's actually the opposite: bafa1bd broke this, wasn't ported to proposal-temporal as far as I can tell, where presumably the test would have failed. Should that commit be rolled back, or should the test change? I could certainly see a use for a test that verifies that some equivalent object is passed, but as far as I can tell the Test262 assertion library is... lacking in that regard. |
@justingrant R.e. your issues with plugins: what plugin(s) are you using? I've also been using VSCode to work on this, and I haven't seen any such popup (though I'm guessing it's because I don't have the right plugins installed - I generally use VSCode as a glorified text editor w/ TS Language features and leave the linting and such to CLI tooling, as it's not very well integrated at Google). |
Apparently this is a port of tc39/proposal-temporal#1748 which hasn't landed yet. |
@justingrant I tried installing both the eslint and prettier plugins, but as far as I can tell they both seem fine when opening up various files. Maybe since you tried this I had added the tc39 folder to I'm going to merge, this but if you continue to see this issue please file another issue and I'll take a look next week. |
Sounds good. Thanks for getting this working! |
Fixes #4, though there are test failures in both the original repo and in this one which should probably get fixed up before using this as part of CI.