Skip to content

Commit b3f0391

Browse files
committed
Fixes for lint
1 parent d0b191c commit b3f0391

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

desktop/panel/testutil.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ exports.inPath = function (program) {
2828
win32: 'whereis',
2929
}[process.platform];
3030
console.log(`Looking up ${program} in path.`);
31-
const proc = spawnSync(where, [program]);
32-
console.log('stderr', proc.stderr.toString());
33-
console.log('stdout', proc.stdout.toString());
31+
const proc = spawnSync(where, [program], { shell: true, stdio: 'inherit' });
3432
return proc.status === 0;
3533
};
3634

jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,10 @@ module.exports = {
3838
'server/**/*.tsx',
3939
],
4040
modulePathIgnorePatterns: ['<rootDir>/releases/', '<rootDir>/build/', 'ee/'],
41+
reporters: [
42+
[
43+
'jest-slow-test-reporter',
44+
{ numTests: 8, warnOnSlowerThan: 300, color: true },
45+
],
46+
],
4147
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"eslint-plugin-react-hooks": "^4.6.0",
9797
"jest": "^29.5.0",
9898
"jest-canvas-mock": "^2.5.1",
99+
"jest-slow-test-reporter": "^1.0.0",
99100
"node-fetch": "2",
100101
"prettier": "^2.8.8",
101102
"prettier-plugin-organize-imports": "^3.2.2",

runner/cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func eval(ec runner.EvalContext, projectId, panelId, panelMetaOut string) {
110110
}
111111

112112
func main() {
113-
rand.Seed(time.Now().UnixNano())
113+
rand.New(rand.NewSource(time.Now().UnixNano()))
114114

115115
runner.Verbose = true
116116
runner.Logln(APP_NAME + " " + VERSION)

runner/json.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package runner
33
import (
44
"encoding/json"
55
"io"
6-
"io/ioutil"
76
"os"
87
"strings"
98

@@ -86,7 +85,7 @@ func loadJSONArrayFileWithPath(f, path string) (chan map[string]any, error) {
8685

8786
var reader io.Reader = fd
8887
if path != "" {
89-
data, err := ioutil.ReadAll(fd)
88+
data, err := io.ReadAll(fd)
9089
if err != nil {
9190
return nil, err
9291
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4429,6 +4429,11 @@ jest-runtime@^29.5.0:
44294429
slash "^3.0.0"
44304430
strip-bom "^4.0.0"
44314431

4432+
jest-slow-test-reporter@^1.0.0:
4433+
version "1.0.0"
4434+
resolved "https://registry.yarnpkg.com/jest-slow-test-reporter/-/jest-slow-test-reporter-1.0.0.tgz#cb8b4fa3212c1bf9fd3794c79faf0c863807d59e"
4435+
integrity sha512-5FG8hlaO7Wdgdo6oQxGiFAKwd1HW51+8/KmQJgUV3bsW3cCXx9TukaoGnHhBl+hwLkCYENynWL1PQnG8DwOV6w==
4436+
44324437
jest-snapshot@^29.5.0:
44334438
version "29.5.0"
44344439
resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce"

0 commit comments

Comments
 (0)