forked from Roblox/react-testing-library-lua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs-to-lua.config.js
50 lines (49 loc) · 1.66 KB
/
js-to-lua.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module.exports = {
lastSync: {
ref: "646129b59659e2f3509a6fff606a9871b2a68a9c",
conversionToolVersion: "ef4bcc5c0d0fc3c5ca56cc84212d267b598f9de6"
},
upstream: {
owner: "testing-library",
repo: "react-testing-library",
primaryBranch: "main"
},
downstream: {
owner: "roblox",
repo: "react-testing-library-lua-internal",
primaryBranch: "main",
patterns: [
"src/**/*.lua"
]
},
renameFiles: [
[
(filename) => filename.endsWith(".test.lua"),
(filename) => filename.replace(".test.lua", ".spec.lua")
],
[
(filename) => filename.endsWith(".test.ts.lua"),
(filename) => filename.replace(".test.ts.lua", ".spec.snap.lua")
],
[
(filename) => filename.endsWith(".ts.lua") && !filename.endsWith(".test.ts.lua"),
(filename) => filename.replace(".ts.lua", ".spec.snap.lua")
],
[
(filename) => filename.endsWith(".snap.lua") && !filename.endsWith(".spec.snap.lua"),
(filename) => filename.replace(".snap.lua", ".spec.snap.lua")
],
[
(filename) => filename.includes('__tests__') && !filename.includes('.spec.') && !filename.endsWith('index.lua'),
(filename) => filename.replace('.lua', '.spec.lua')
],
[
(filename) => filename.endsWith('index.lua'),
(filename) => filename.replace('index.lua', 'init.lua')
],
[
(filename) => filename.endsWith('.d.ts'),
(filename) => filename.replace('.d.ts', '.ts')
]
]
}