mirror of
https://github.com/swc-project/swc.git
synced 2024-11-27 13:38:33 +03:00
chore: Check for issues already fixed (#2429)
- Closes #2372. - Closes #2351.
This commit is contained in:
parent
267d639c2e
commit
a25d67bfbf
8
tests/fixture/issue-2351/1/input/.swcrc
Normal file
8
tests/fixture/issue-2351/1/input/.swcrc
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "ecmascript",
|
||||
"jsx": true
|
||||
}
|
||||
}
|
||||
}
|
1
tests/fixture/issue-2351/1/input/index.js
Normal file
1
tests/fixture/issue-2351/1/input/index.js
Normal file
@ -0,0 +1 @@
|
||||
const a = <abbr title="\d">\d</abbr>;
|
3
tests/fixture/issue-2351/1/output/index.js
Normal file
3
tests/fixture/issue-2351/1/output/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
var a = /*#__PURE__*/ React.createElement("abbr", {
|
||||
title: "d"
|
||||
}, "\\d");
|
40
tests/fixture/issue-2372/input/.swcrc
Normal file
40
tests/fixture/issue-2372/input/.swcrc
Normal file
@ -0,0 +1,40 @@
|
||||
[
|
||||
{
|
||||
"env": {
|
||||
"targets": {
|
||||
"node": "12.19.0"
|
||||
}
|
||||
},
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"dynamicImport": true,
|
||||
"syntax": "typescript",
|
||||
"tsx": false
|
||||
},
|
||||
"target": "es2015"
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs"
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"test": ".*.ts$"
|
||||
},
|
||||
{
|
||||
"env": {
|
||||
"targets": {
|
||||
"node": "12.19.0"
|
||||
}
|
||||
},
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"dynamicImport": true,
|
||||
"syntax": "ecmascript"
|
||||
},
|
||||
"target": "es2015"
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs"
|
||||
},
|
||||
"test": ".*.js$"
|
||||
}
|
||||
]
|
11
tests/fixture/issue-2372/input/index.js
Normal file
11
tests/fixture/issue-2372/input/index.js
Normal file
@ -0,0 +1,11 @@
|
||||
import { sum } from './';
|
||||
|
||||
describe('example test that should fail due to compilation', () => {
|
||||
test.each([
|
||||
['a', 1, 1, 2],
|
||||
['b', 2, 2, 4],
|
||||
])('for entry %s', (_, a, b, expected) => {
|
||||
const result = sum(a, b);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
21
tests/fixture/issue-2372/output/index.js
Normal file
21
tests/fixture/issue-2372/output/index.js
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
var _1 = require("./");
|
||||
describe('example test that should fail due to compilation', ()=>{
|
||||
test.each([
|
||||
[
|
||||
'a',
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
'b',
|
||||
2,
|
||||
2,
|
||||
4
|
||||
],
|
||||
])('for entry %s', (_, a, b, expected)=>{
|
||||
const result = (0, _1).sum(a, b);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user