Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions bin/localTest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env node

// Cross platform replacement for `gulp testVisual --env=local --branch=`git rev-parse --abbrev-ref HEAD``
// Command substitution with backticks does not work on Windows (cmd.exe), so resolve the
// branch name here and forward any extra arguments through to gulp.

const { execFileSync, spawnSync } = require('child_process')

const branch = execFileSync('git', ['rev-parse', '--abbrev-ref', 'HEAD'], { encoding: 'utf8' }).trim()

const result = spawnSync(
'gulp',
['testVisual', '--env=local', `--branch=${branch}`, ...process.argv.slice(2)],
{ stdio: 'inherit', shell: true }
)

if (result.error) {
console.error(result.error.message)
process.exit(1)
}

process.exit(result.status === null ? 1 : result.status)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "gulp lint",
"serve": "gulp serve",
"test": "npm run localTest",
"localTest": "gulp testSpecs && gulp testVisual --env=local --branch=`git rev-parse --abbrev-ref HEAD`",
"localTest": "node ./bin/localTest.js",
"gatherDiffs": "rm -rf .tmp/diffs; mkdir -p .tmp/diffs/; BRANCH=`git rev-parse --abbrev-ref HEAD` && for I in `find theSrc/test/snapshots/local/$BRANCH -type d -name __diff_output__`; do cp $I/* .tmp/diffs/ 2> /dev/null; done; true",
"gatherMasterDiffs": "rm -rf .tmp/diffs; mkdir -p .tmp/diffs/; for I in `find theSrc/test/snapshots/local/master -type d -name __diff_output__`; do cp $I/* .tmp/diffs/ 2> /dev/null; done; true",
"macOpenDiffs": "open .tmp/diffs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"coreNodes": [
[1,-4],
[1,-3],
[1,-2],
[1,-1],
[1, 0],
[1, 1],
[1, 2],
[1, 3],
[1, 4]
],
"coreLabels": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I"
],
"surfaceNodes": [
[1,-4],
[1,-3],
[1,-2],
[1,-1],
[1, 0],
[1, 1],
[1, 2],
[1, 3],
[1, 4]
],
"surfaceLabels": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 1
title: north_south_axial_data
general_comments: []
width: 500
height: 500
type: single_page_one_example_per_config
comments: []
data: data.functional_tests.north_south_axial_data
config:
- '{}'
Comment thread
SurreyHughesDisplayr marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading