Skip to content

Commit

Permalink
Fixes for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed Jul 11, 2023
1 parent d0b191c commit b3f0391
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
4 changes: 1 addition & 3 deletions desktop/panel/testutil.js
Expand Up @@ -28,9 +28,7 @@ exports.inPath = function (program) {
win32: 'whereis',
}[process.platform];
console.log(`Looking up ${program} in path.`);
const proc = spawnSync(where, [program]);
console.log('stderr', proc.stderr.toString());
console.log('stdout', proc.stdout.toString());
const proc = spawnSync(where, [program], { shell: true, stdio: 'inherit' });
return proc.status === 0;
};

Expand Down
6 changes: 6 additions & 0 deletions jest.config.js
Expand Up @@ -38,4 +38,10 @@ module.exports = {
'server/**/*.tsx',
],
modulePathIgnorePatterns: ['<rootDir>/releases/', '<rootDir>/build/', 'ee/'],
reporters: [
[
'jest-slow-test-reporter',
{ numTests: 8, warnOnSlowerThan: 300, color: true },
],
],
};
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -96,6 +96,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.5.0",
"jest-canvas-mock": "^2.5.1",
"jest-slow-test-reporter": "^1.0.0",
"node-fetch": "2",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.2",
Expand Down
2 changes: 1 addition & 1 deletion runner/cmd/main.go
Expand Up @@ -110,7 +110,7 @@ func eval(ec runner.EvalContext, projectId, panelId, panelMetaOut string) {
}

func main() {
rand.Seed(time.Now().UnixNano())
rand.New(rand.NewSource(time.Now().UnixNano()))

runner.Verbose = true
runner.Logln(APP_NAME + " " + VERSION)
Expand Down
3 changes: 1 addition & 2 deletions runner/json.go
Expand Up @@ -3,7 +3,6 @@ package runner
import (
"encoding/json"
"io"
"io/ioutil"
"os"
"strings"

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

var reader io.Reader = fd
if path != "" {
data, err := ioutil.ReadAll(fd)
data, err := io.ReadAll(fd)
if err != nil {
return nil, err
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -4429,6 +4429,11 @@ jest-runtime@^29.5.0:
slash "^3.0.0"
strip-bom "^4.0.0"

jest-slow-test-reporter@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/jest-slow-test-reporter/-/jest-slow-test-reporter-1.0.0.tgz#cb8b4fa3212c1bf9fd3794c79faf0c863807d59e"
integrity sha512-5FG8hlaO7Wdgdo6oQxGiFAKwd1HW51+8/KmQJgUV3bsW3cCXx9TukaoGnHhBl+hwLkCYENynWL1PQnG8DwOV6w==

jest-snapshot@^29.5.0:
version "29.5.0"
resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce"
Expand Down

0 comments on commit b3f0391

Please sign in to comment.