add a test for decorator context names
This was taken from the babel test suite https://github.com/babel/babel/blob/87ec4fc3d2cf44c30ef007f7da47d7177e07ffec/packages/babel-plugin-proposal-decorators/test/fixtures/2023-11-accessors/context-name/input.js#L1
Thanks for the review @ptomato 🎉
I've updated the message and removed my TODO item for removing the seemingly valid syntax 👍 is there something that I need to do to the frontmatter to mark it that it's currently expected to fail?
I don't really have a good sense of whether we already have coverage for this stuff
So I have 2 thoughts on this. If adding this test has identified a legitimate error that should have passed then this is clearly adding coverage for something that wasn't already covered 😂 But looking at the files that are already in the suite for decorators it seems that there are only syntax tests that have the comment This file was procedurally generated from the following sources so I'm assuming there are no hand-crafted tests that have any assertions, or at least that's how it seems from my investigations.
But anyway, I'm adding these tests with the help of @pzuraq so I'm sure she'll be the best person to comment on this 😂
Decorators coverage right now is something like 0.1%, so thank you very much!
If you plan to submit more tests, it would be incredibly useful if you could write a "testing plan" (like https://github.com/tc39/test262/issues/3725) so that it's easier to tell what's covered and what's not.
Please add a copyright header as well
is there something that I need to do to the frontmatter to mark it that it's currently expected to fail?
@mansona There are no expected-to-fail tests, so nothing to do on your end. (The way it works is, a hypothetical JS implementation that correctly implements the spec plus all stage-3 proposals must pass all test262 tests. Implementations maintain their own expected-to-fail lists separately.)
Please add a copyright header as well
So I was wondering about that one 🤔 As I said in the description I copied the test from the babel test suite, so should I set the copyright header to the original author? Is there any guidance on that?
As I said in the description I copied the test from the babel test suite, so should I set the copyright header to the original author? Is there any guidance on that?
Copyrights are annoying to deal with, sorry. Ideally the Babel test file would have its own copyright header, but it doesn't. You'd have to ask the Babel project if the copyright line in babel/LICENSE ("Copyright (c) 2014-present Sebastian McKenzie and other contributors") applies to everything in the babel repo. If not, then you'd have to talk to the authors of that file figure out who owns the copyright.
(Public service announcement: Open source projects, please require license and copyright headers in every file in the repo! There are tools such as REUSE that you can drop into your CI and make this easy, or you can roll your own like test262 does :smile:)
Hey, could you use "The Babel Team"? Unfortunately different packages in our repo have different author/copyright owner, so the best thing to do is to look for the author field in the relevant package.json (https://github.com/babel/babel/blob/dd699a8509f02efd7e5a45d49cf24b757a59e4a2/packages/babel-plugin-proposal-decorators/package.json#L4C14-L4C30)
@nicolo-ribaudo I've made a test plan in this issue: https://github.com/tc39/test262/issues/4042