Add comment support to `@gate` pragma (#21881)
So you can more easily comment on why a test is gated.
This commit is contained in:
parent
81346764bb
commit
f0efb7b70f
|
@ -160,6 +160,11 @@ describe('transform-test-gate-pragma', () => {
|
|||
test('single quoted strings', () => {
|
||||
expect(shouldPass).toBe(true);
|
||||
});
|
||||
|
||||
// @gate flagThatIsOn // This is a comment
|
||||
test('line comment', () => {
|
||||
expect(shouldPass).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('transform test-gate-pragma: actual runtime', () => {
|
||||
|
|
|
@ -93,6 +93,10 @@ function transform(babel) {
|
|||
tokens.push({type: next2});
|
||||
i += 2;
|
||||
continue;
|
||||
case '//':
|
||||
// This is the beginning of a line comment. The rest of the line
|
||||
// is ignored.
|
||||
return tokens;
|
||||
}
|
||||
|
||||
switch (char) {
|
||||
|
|
Loading…
Reference in New Issue