@neurodevs/ndx-native 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.regressionproof.json +7 -0
- package/.vscode/launch.json +52 -57
- package/.vscode/settings.json +62 -66
- package/.vscode/tasks.json +123 -129
- package/README.md +1 -0
- package/build/.spruce/settings.json +7 -7
- package/build/__tests__/AbstractPackageTest.d.ts +1 -0
- package/build/__tests__/AbstractPackageTest.js +1 -0
- package/build/__tests__/AbstractPackageTest.js.map +1 -1
- package/build/__tests__/impl/LabrecorderAdapter.test.d.ts +1 -1
- package/build/__tests__/impl/LabrecorderAdapter.test.js +9 -9
- package/build/__tests__/impl/LabrecorderAdapter.test.js.map +1 -1
- package/build/__tests__/impl/LiblslAdapter.test.d.ts +3 -4
- package/build/__tests__/impl/LiblslAdapter.test.js +18 -26
- package/build/__tests__/impl/LiblslAdapter.test.js.map +1 -1
- package/build/__tests__/impl/LibndxAdapter.test.d.ts +35 -0
- package/build/__tests__/impl/LibndxAdapter.test.js +258 -0
- package/build/__tests__/impl/LibndxAdapter.test.js.map +1 -0
- package/build/__tests__/impl/LibxdfAdapter.test.d.ts +1 -2
- package/build/__tests__/impl/LibxdfAdapter.test.js +5 -6
- package/build/__tests__/impl/LibxdfAdapter.test.js.map +1 -1
- package/build/impl/LiblslAdapter.d.ts +7 -9
- package/build/impl/LiblslAdapter.js +111 -117
- package/build/impl/LiblslAdapter.js.map +1 -1
- package/build/impl/LibndxAdapter.d.ts +57 -0
- package/build/impl/LibndxAdapter.js +145 -0
- package/build/impl/LibndxAdapter.js.map +1 -0
- package/build/impl/LibxdfAdapter.d.ts +3 -3
- package/build/impl/LibxdfAdapter.js +10 -7
- package/build/impl/LibxdfAdapter.js.map +1 -1
- package/build/index.d.ts +6 -2
- package/build/index.js +8 -3
- package/build/index.js.map +1 -1
- package/build/lib/{handleError.d.ts → handleLslError.d.ts} +1 -1
- package/build/lib/{handleError.js → handleLslError.js} +2 -2
- package/build/lib/handleLslError.js.map +1 -0
- package/build/testDoubles/Libndx/FakeLibndx.d.ts +22 -0
- package/build/testDoubles/Libndx/FakeLibndx.js +58 -0
- package/build/testDoubles/Libndx/FakeLibndx.js.map +1 -0
- package/build/types.d.ts +2 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/eslint.config.js +3 -0
- package/package.json +15 -31
- package/prettier.config.js +3 -0
- package/src/.spruce/settings.json +7 -7
- package/src/__tests__/AbstractPackageTest.ts +2 -0
- package/src/__tests__/impl/LabrecorderAdapter.test.ts +27 -11
- package/src/__tests__/impl/LiblslAdapter.test.ts +19 -26
- package/src/__tests__/impl/LibndxAdapter.test.ts +279 -0
- package/src/__tests__/impl/LibxdfAdapter.test.ts +5 -6
- package/src/impl/LiblslAdapter.ts +119 -127
- package/src/impl/LibndxAdapter.ts +204 -0
- package/src/impl/LibxdfAdapter.ts +13 -15
- package/src/index.ts +11 -3
- package/src/lib/{handleError.ts → handleLslError.ts} +1 -1
- package/src/testDoubles/Libndx/FakeLibndx.ts +74 -0
- package/src/types.ts +7 -0
- package/tsconfig.json +24 -27
- package/build/lib/handleError.js.map +0 -1
- package/eslint.config.mjs +0 -3
package/.vscode/launch.json
CHANGED
|
@@ -1,58 +1,53 @@
|
|
|
1
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"console": "integratedTerminal",
|
|
55
|
-
"internalConsoleOptions": "neverOpen"
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "node",
|
|
6
|
+
"request": "attach",
|
|
7
|
+
"name": "attach.tests",
|
|
8
|
+
"port": 5200,
|
|
9
|
+
"restart": true,
|
|
10
|
+
"timeout": 10000
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "node",
|
|
14
|
+
"request": "launch",
|
|
15
|
+
"name": "test.file",
|
|
16
|
+
"runtimeExecutable": "node",
|
|
17
|
+
"runtimeArgs": [
|
|
18
|
+
"--inspect-brk",
|
|
19
|
+
"--trace-warnings",
|
|
20
|
+
"${workspaceFolder}/node_modules/.bin/jest",
|
|
21
|
+
"${fileBasenameNoExtension}",
|
|
22
|
+
"--detectOpenHandles"
|
|
23
|
+
],
|
|
24
|
+
"cwd": "${workspaceFolder}",
|
|
25
|
+
"console": "integratedTerminal",
|
|
26
|
+
"internalConsoleOptions": "neverOpen"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "node",
|
|
30
|
+
"request": "launch",
|
|
31
|
+
"name": "test.all",
|
|
32
|
+
"runtimeExecutable": "node",
|
|
33
|
+
"runtimeArgs": [
|
|
34
|
+
"--inspect-brk",
|
|
35
|
+
"--trace-warnings",
|
|
36
|
+
"${workspaceFolder}/node_modules/.bin/jest"
|
|
37
|
+
],
|
|
38
|
+
"cwd": "${workspaceFolder}",
|
|
39
|
+
"console": "integratedTerminal",
|
|
40
|
+
"internalConsoleOptions": "neverOpen"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "node",
|
|
44
|
+
"request": "launch",
|
|
45
|
+
"name": "boot",
|
|
46
|
+
"runtimeExecutable": "yarn",
|
|
47
|
+
"runtimeArgs": ["run", "--inspect-brk", "--trace-warnings", "boot"],
|
|
48
|
+
"cwd": "${workspaceFolder}",
|
|
49
|
+
"console": "integratedTerminal",
|
|
50
|
+
"internalConsoleOptions": "neverOpen"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,67 +1,63 @@
|
|
|
1
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"editor.codeActionsOnSave": {
|
|
65
|
-
"source.fixAll.eslint": "always"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
2
|
+
"debug.node.autoAttach": "on",
|
|
3
|
+
"git.ignoreLimitWarning": true,
|
|
4
|
+
"javascript.validate.enable": false,
|
|
5
|
+
"files.watcherExclude": {
|
|
6
|
+
"**/.git/objects/**": true,
|
|
7
|
+
"**/.git/subtree-cache/**": true,
|
|
8
|
+
"**/build/**": true,
|
|
9
|
+
"**/node_modules/**": true
|
|
10
|
+
},
|
|
11
|
+
"search.exclude": {
|
|
12
|
+
"**/build/**": true,
|
|
13
|
+
"**/node_modules/**": true,
|
|
14
|
+
"**/.next/**": true
|
|
15
|
+
},
|
|
16
|
+
"editor.codeActionsOnSave": {
|
|
17
|
+
"source.fixAll.eslint": "always"
|
|
18
|
+
},
|
|
19
|
+
"editor.formatOnSave": true,
|
|
20
|
+
"editor.formatOnSaveMode": "file",
|
|
21
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
22
|
+
"editor.maxTokenizationLineLength": 20000000,
|
|
23
|
+
"[javascript]": {
|
|
24
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
25
|
+
"editor.formatOnSave": true
|
|
26
|
+
},
|
|
27
|
+
"[javascriptreact]": {
|
|
28
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
29
|
+
"editor.formatOnSave": true
|
|
30
|
+
},
|
|
31
|
+
"[typescript]": {
|
|
32
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
33
|
+
"editor.formatOnSave": true
|
|
34
|
+
},
|
|
35
|
+
"[typescriptreact]": {
|
|
36
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
37
|
+
"editor.formatOnSave": true
|
|
38
|
+
},
|
|
39
|
+
"eslint.enable": true,
|
|
40
|
+
"eslint.useFlatConfig": true,
|
|
41
|
+
"eslint.validate": [
|
|
42
|
+
"javascript",
|
|
43
|
+
"javascriptreact",
|
|
44
|
+
"typescript",
|
|
45
|
+
"typescriptreact"
|
|
46
|
+
],
|
|
47
|
+
"eslint.workingDirectories": ["./"],
|
|
48
|
+
"debug.javascript.unmapMissingSources": true,
|
|
49
|
+
"javascript.preferences.importModuleSpecifier": "relative",
|
|
50
|
+
"typescript.preferences.importModuleSpecifier": "relative",
|
|
51
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
52
|
+
"typescript.validate.enable": true,
|
|
53
|
+
"cSpell.ignorePaths": [
|
|
54
|
+
"**/package-lock.json",
|
|
55
|
+
"**/node_modules/**",
|
|
56
|
+
"**/build/**",
|
|
57
|
+
"**/vscode-extension/**",
|
|
58
|
+
"**/.git/objects/**",
|
|
59
|
+
".vscode",
|
|
60
|
+
".spruce"
|
|
61
|
+
],
|
|
62
|
+
"cSpell.words": ["arkit", "autogenerated", "scrollable", "serializable"]
|
|
63
|
+
}
|
package/.vscode/tasks.json
CHANGED
|
@@ -1,130 +1,124 @@
|
|
|
1
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"description": "ndx command",
|
|
126
|
-
"default": "create.module",
|
|
127
|
-
"type": "promptString"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
}
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"type": "npm",
|
|
6
|
+
"script": "watch.build.dev",
|
|
7
|
+
"group": "build",
|
|
8
|
+
"label": "watch.build.dev & problem.watcher",
|
|
9
|
+
"isBackground": true,
|
|
10
|
+
"runOptions": {
|
|
11
|
+
"runOn": "folderOpen"
|
|
12
|
+
},
|
|
13
|
+
"promptOnClose": false,
|
|
14
|
+
"presentation": {
|
|
15
|
+
"focus": false,
|
|
16
|
+
"reveal": "never"
|
|
17
|
+
},
|
|
18
|
+
"problemMatcher": {
|
|
19
|
+
"base": "$tsc-watch",
|
|
20
|
+
"applyTo": "allDocuments"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"label": "test.file",
|
|
25
|
+
"command": "spruce",
|
|
26
|
+
"args": [
|
|
27
|
+
"test",
|
|
28
|
+
"--inspect",
|
|
29
|
+
"5200",
|
|
30
|
+
"--pattern",
|
|
31
|
+
"${fileBasenameNoExtension}",
|
|
32
|
+
"--watchMode",
|
|
33
|
+
"standard"
|
|
34
|
+
],
|
|
35
|
+
"promptOnClose": false,
|
|
36
|
+
"group": {
|
|
37
|
+
"kind": "test",
|
|
38
|
+
"isDefault": true
|
|
39
|
+
},
|
|
40
|
+
"presentation": {
|
|
41
|
+
"reveal": "always",
|
|
42
|
+
"panel": "dedicated"
|
|
43
|
+
},
|
|
44
|
+
"problemMatcher": []
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"label": "test.reporter",
|
|
48
|
+
"command": "spruce",
|
|
49
|
+
"args": ["test", "--shouldHoldAtStart", "true", "--watchMode", "smart"],
|
|
50
|
+
"promptOnClose": false,
|
|
51
|
+
"group": "test",
|
|
52
|
+
"runOptions": {
|
|
53
|
+
"runOn": "folderOpen"
|
|
54
|
+
},
|
|
55
|
+
"presentation": {
|
|
56
|
+
"panel": "shared",
|
|
57
|
+
"focus": true,
|
|
58
|
+
"reveal": "always"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"label": "spruce",
|
|
63
|
+
"type": "shell",
|
|
64
|
+
"command": "spruce ${input:spruceCommand}",
|
|
65
|
+
"problemMatcher": [],
|
|
66
|
+
"presentation": {
|
|
67
|
+
"reveal": "always",
|
|
68
|
+
"focus": true,
|
|
69
|
+
"panel": "new",
|
|
70
|
+
"clear": false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"label": "shell",
|
|
75
|
+
"type": "shell",
|
|
76
|
+
"command": "${input:command} ${input:optionsCommand}",
|
|
77
|
+
"problemMatcher": [],
|
|
78
|
+
"presentation": {
|
|
79
|
+
"reveal": "always",
|
|
80
|
+
"focus": true,
|
|
81
|
+
"panel": "new",
|
|
82
|
+
"clear": false
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"label": "ndx",
|
|
87
|
+
"type": "shell",
|
|
88
|
+
"command": "ndx ${input:ndxCommand}",
|
|
89
|
+
"problemMatcher": [],
|
|
90
|
+
"presentation": {
|
|
91
|
+
"reveal": "always",
|
|
92
|
+
"focus": true,
|
|
93
|
+
"panel": "new",
|
|
94
|
+
"clear": false
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"inputs": [
|
|
99
|
+
{
|
|
100
|
+
"id": "spruceCommand",
|
|
101
|
+
"description": "spruce command",
|
|
102
|
+
"default": "create.test",
|
|
103
|
+
"type": "promptString"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "command",
|
|
107
|
+
"description": "command",
|
|
108
|
+
"default": "yarn",
|
|
109
|
+
"type": "promptString"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "optionsCommand",
|
|
113
|
+
"description": "optionsCommand",
|
|
114
|
+
"default": "add",
|
|
115
|
+
"type": "promptString"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "ndxCommand",
|
|
119
|
+
"description": "ndx command",
|
|
120
|
+
"default": "create.module",
|
|
121
|
+
"type": "promptString"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
package/README.md
CHANGED
|
@@ -3,5 +3,6 @@ export default abstract class AbstractPackageTest extends AbstractModuleTest {
|
|
|
3
3
|
protected static readonly channelNames: string[];
|
|
4
4
|
protected static readonly channelCount: number;
|
|
5
5
|
protected static readonly chunkSize = 2;
|
|
6
|
+
protected static readonly fakeErrorMessage = "Fake error message!";
|
|
6
7
|
protected static beforeEach(): Promise<void>;
|
|
7
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractPackageTest.js","sourceRoot":"","sources":["../../src/__tests__/AbstractPackageTest.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,qBAAqB,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAgB,mBAAoB,SAAQ,kBAAkB;IAC9D,MAAM,CAAU,YAAY,GAAG;QACrC,IAAI,CAAC,UAAU,EAAE;QACjB,IAAI,CAAC,UAAU,EAAE;QACjB,IAAI,CAAC,UAAU,EAAE;KACpB,CAAA;IAES,MAAM,CAAU,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;IACvD,MAAM,CAAU,SAAS,GAAG,CAAC,CAAA;IAE7B,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;IAC5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"AbstractPackageTest.js","sourceRoot":"","sources":["../../src/__tests__/AbstractPackageTest.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,qBAAqB,CAAA;AAEpD,MAAM,CAAC,OAAO,OAAgB,mBAAoB,SAAQ,kBAAkB;IAC9D,MAAM,CAAU,YAAY,GAAG;QACrC,IAAI,CAAC,UAAU,EAAE;QACjB,IAAI,CAAC,UAAU,EAAE;QACjB,IAAI,CAAC,UAAU,EAAE;KACpB,CAAA;IAES,MAAM,CAAU,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;IACvD,MAAM,CAAU,SAAS,GAAG,CAAC,CAAA;IAE7B,MAAM,CAAU,gBAAgB,GAAG,qBAAqB,CAAA;IAExD,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;IAC5B,CAAC"}
|
|
@@ -10,7 +10,7 @@ export default class LabrecorderAdapterTest extends AbstractPackageTest {
|
|
|
10
10
|
private static readonly filename;
|
|
11
11
|
private static readonly watchFor;
|
|
12
12
|
protected static beforeEach(): Promise<void>;
|
|
13
|
-
protected static
|
|
13
|
+
protected static createsInstance(): Promise<void>;
|
|
14
14
|
protected static callsFfiRsOpenWithRequiredOptions(): Promise<void>;
|
|
15
15
|
protected static callsFfiRsDefineWithRequiredOptions(): Promise<void>;
|
|
16
16
|
protected static createRecordingCallsBindings(): Promise<void>;
|
|
@@ -26,14 +26,14 @@ export default class LabrecorderAdapterTest extends AbstractPackageTest {
|
|
|
26
26
|
this.fakeFfiRsDefine();
|
|
27
27
|
this.instance = this.LabrecorderAdapter();
|
|
28
28
|
}
|
|
29
|
-
static async
|
|
30
|
-
assert.isTruthy(this.instance, '
|
|
29
|
+
static async createsInstance() {
|
|
30
|
+
assert.isTruthy(this.instance, 'Failed to create instance!');
|
|
31
31
|
}
|
|
32
32
|
static async callsFfiRsOpenWithRequiredOptions() {
|
|
33
33
|
assert.isEqualDeep(this.ffiRsOpenOptions, {
|
|
34
34
|
library: 'labrecorder',
|
|
35
35
|
path: this.labrecorderPath,
|
|
36
|
-
});
|
|
36
|
+
}, 'Did not pass valid options to ffiRsOpen!');
|
|
37
37
|
}
|
|
38
38
|
static async callsFfiRsDefineWithRequiredOptions() {
|
|
39
39
|
this.LabrecorderAdapter();
|
|
@@ -61,7 +61,7 @@ export default class LabrecorderAdapterTest extends AbstractPackageTest {
|
|
|
61
61
|
DataType.External, // Pointer to the recording object
|
|
62
62
|
],
|
|
63
63
|
},
|
|
64
|
-
}, '
|
|
64
|
+
}, 'Did not pass valid options to ffiRsDefine!');
|
|
65
65
|
}
|
|
66
66
|
static async createRecordingCallsBindings() {
|
|
67
67
|
this.createRecording();
|
|
@@ -69,22 +69,22 @@ export default class LabrecorderAdapterTest extends AbstractPackageTest {
|
|
|
69
69
|
filename: this.filename,
|
|
70
70
|
watchFor: this.watchFor,
|
|
71
71
|
watchForCount: this.watchFor.length,
|
|
72
|
-
}, '
|
|
72
|
+
}, 'Did not create a recording!');
|
|
73
73
|
}
|
|
74
74
|
static async defaultsToMacOsPath() {
|
|
75
75
|
const defaultLabrecorderPath = '/opt/local/lib/liblabrecorder.dylib';
|
|
76
76
|
LabrecorderAdapter.Create();
|
|
77
77
|
const { path } = this.ffiRsOpenOptions ?? {};
|
|
78
|
-
assert.isEqual(path, defaultLabrecorderPath);
|
|
78
|
+
assert.isEqual(path, defaultLabrecorderPath, 'Did not use default macOS path!');
|
|
79
79
|
}
|
|
80
80
|
static async stopRecordingCallsBindings() {
|
|
81
81
|
const recording = this.createRecording();
|
|
82
82
|
this.stopRecording(recording);
|
|
83
|
-
assert.isEqualDeep(this.callsToRecordingStop[0], recording);
|
|
83
|
+
assert.isEqualDeep(this.callsToRecordingStop[0], recording, 'Did not stop recording!');
|
|
84
84
|
}
|
|
85
85
|
static async deleteRecordingCallsBindings() {
|
|
86
86
|
const recording = this.createAndDeleteRecording();
|
|
87
|
-
assert.isEqualDeep(this.callsToRecordingDelete[0], recording);
|
|
87
|
+
assert.isEqualDeep(this.callsToRecordingDelete[0], recording, 'Did not delete recording!');
|
|
88
88
|
}
|
|
89
89
|
static createAndDeleteRecording() {
|
|
90
90
|
const recording = this.createRecording();
|
|
@@ -142,7 +142,7 @@ export default class LabrecorderAdapterTest extends AbstractPackageTest {
|
|
|
142
142
|
}
|
|
143
143
|
__decorate([
|
|
144
144
|
test()
|
|
145
|
-
], LabrecorderAdapterTest, "
|
|
145
|
+
], LabrecorderAdapterTest, "createsInstance", null);
|
|
146
146
|
__decorate([
|
|
147
147
|
test()
|
|
148
148
|
], LabrecorderAdapterTest, "callsFfiRsOpenWithRequiredOptions", null);
|