Skip to content

Commit 45f6774

Browse files
committed
commit schema file as a baseline in test folder & compate with auto-generated one in dist folder
1 parent 818a25b commit 45f6774

File tree

4 files changed

+68410
-3
lines changed

4 files changed

+68410
-3
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ jobs:
254254
steps:
255255
- attach_workspace:
256256
at: ~/
257+
- run:
258+
name: Test plot-schema.json diff
259+
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
257260
- run:
258261
name: Test plotly.min.js import using requirejs
259262
command: npm run test-requirejs

tasks/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var isDist = process.argv[2] === 'dist';
1919

2020
var pathToSchema = isDist ?
2121
constants.pathToSchemaDist :
22-
constants.pathToSchemaBuild;
22+
constants.pathToSchemaDiff;
2323

2424
var pathToPlotly = isDist ?
2525
constants.pathToPlotlyDistWithMeta :

tasks/util/constants.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ var pkg = require('../../package.json');
55
var pathToRoot = path.join(__dirname, '../../');
66
var pathToSrc = path.join(pathToRoot, 'src/');
77
var pathToLib = path.join(pathToRoot, 'lib/');
8-
var pathToImageTest = path.join(pathToRoot, 'test/image');
8+
var pathToTest = path.join(pathToRoot, 'test/');
9+
var pathToImageTest = path.join(pathToTest, 'image/');
910
var pathToStrictD3Module = path.join(pathToRoot, 'test/strict-d3.js');
1011
var pathToDist = path.join(pathToRoot, 'dist/');
1112
var pathToBuild = path.join(pathToRoot, 'build/');
@@ -183,7 +184,7 @@ module.exports = {
183184
pathToPlotlyDistMin: path.join(pathToDist, 'plotly.min.js'),
184185
pathToPlotlyDistWithMeta: path.join(pathToDist, 'plotly-with-meta.js'),
185186

186-
pathToSchemaBuild: path.join(pathToBuild, 'plot-schema.json'),
187+
pathToSchemaDiff: path.join(pathToTest, 'plot-schema.json'),
187188
pathToSchemaDist: path.join(pathToDist, 'plot-schema.json'),
188189
pathToTranslationKeys: path.join(pathToDist, 'translation-keys.txt'),
189190

0 commit comments

Comments
 (0)