shinkansen-engine 1.0.22 → 1.0.26
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/babel.config.cjs +5 -9
- package/package.json +40 -26
- package/src/components/cogs/index.cjs +7 -1
- package/src/components/gears/forward/index.cjs +9 -0
- package/src/components/gears/index.cjs +7 -1
- package/src/components/gears/reverse/index.cjs +9 -0
- package/src/components/index.mjs +6 -0
- package/src/components/pantograph/index.cjs +7 -1
- package/src/components/pinion/check-answers/index.cjs +13 -0
- package/src/components/pinion/check-answers/index.mjs +7 -0
- package/src/components/pinion/common/index.cjs +9 -0
- package/src/components/pinion/common/index.mjs +7 -0
- package/src/components/pinion/common/text-content/index.cjs +9 -0
- package/src/components/pinion/error-summary/index.cjs +13 -0
- package/src/components/pinion/error-summary/index.mjs +7 -0
- package/src/components/pinion/index.cjs +8 -2
- package/src/components/pinion/index.mjs +0 -0
- package/src/components/rails/index.cjs +7 -1
- package/src/components/signals/index.cjs +7 -1
- package/src/components/sprockets/index.cjs +7 -1
- package/src/engine/index.cjs +7 -1
- package/src/engine/index.jsx +2 -2
- package/src/index.cjs +6 -0
- package/src/index.mjs +6 -0
- package/src/transformers/pinion/check-answers/index.mjs +6 -0
- package/src/transformers/pinion/common/index.mjs +6 -1
- package/src/transformers/pinion/error-message/index.mjs +7 -0
- package/src/transformers/transmission/from-document-to-hash/index.mjs +6 -0
- package/src/transformers/transmission/from-hash-to-document/index.mjs +6 -0
- package/src/transformers/transmission/index.mjs +6 -0
- package/src/transformers/transmission/to-zashiki/index.mjs +6 -0
- package/test/components/cogs/index.spec.mjs +13 -0
- package/test/components/gears/forward/index.spec.mjs +13 -0
- package/test/components/gears/index.spec.mjs +13 -0
- package/test/components/gears/reverse/index.spec.mjs +13 -0
- package/test/components/pantograph/index.spec.mjs +13 -0
- package/test/components/pinion/check-answers/index.spec.mjs +13 -0
- package/test/components/pinion/common/index.spec.mjs +13 -0
- package/test/components/pinion/common/text-content/index.spec.mjs +13 -0
- package/test/components/pinion/error-summary/index.spec.mjs +13 -0
- package/test/components/pinion/index.spec.mjs +13 -0
- package/test/components/rails/index.spec.mjs +13 -0
- package/test/components/signals/index.spec.mjs +13 -0
- package/test/components/sprockets/index.spec.mjs +13 -0
- package/test/engine/index.spec.mjs +13 -0
- package/test/transformers/pinion/check-answers/index.spec.mjs +18 -0
- package/test/transformers/pinion/common/index.spec.mjs +18 -0
- package/test/transformers/pinion/error-message/index.spec.mjs +18 -0
- package/test/transformers/transmission/from-document-to-hash/index.spec.mjs +13 -0
- package/test/transformers/transmission/from-hash-to-document/index.spec.mjs +13 -0
- package/test/transformers/transmission/index.spec.mjs +27 -0
- package/test/transformers/transmission/to-zashiki/index.spec.mjs +13 -0
- package/src/transformers/pinion/index.mjs +0 -2
package/babel.config.cjs
CHANGED
|
@@ -49,17 +49,13 @@ const plugins = [
|
|
|
49
49
|
],
|
|
50
50
|
[
|
|
51
51
|
'module-resolver', {
|
|
52
|
-
root: [
|
|
53
|
-
'.'
|
|
54
|
-
],
|
|
55
|
-
cwd: 'babelrc',
|
|
56
52
|
alias: {
|
|
57
53
|
/**
|
|
58
|
-
* Storybook
|
|
54
|
+
* Storybook - Engine
|
|
59
55
|
*/
|
|
60
|
-
'shinkansen-engine/gears': './src/components/gears/index.cjs',
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
'shinkansen-engine/components/gears': './src/components/gears/index.cjs',
|
|
57
|
+
'shinkansen-engine/components/pinion': './src/components/pinion/index.cjs',
|
|
58
|
+
'shinkansen-engine': './src/index.cjs'
|
|
63
59
|
}
|
|
64
60
|
}
|
|
65
61
|
]
|
|
@@ -71,6 +67,6 @@ module.exports = (api) => {
|
|
|
71
67
|
return {
|
|
72
68
|
presets,
|
|
73
69
|
plugins,
|
|
74
|
-
ignore: [/
|
|
70
|
+
ignore: [/node_modules\/(?!shinkansen-)/]
|
|
75
71
|
}
|
|
76
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-engine",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Shinkansen Engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"author": "Jonathan Perry for Modern Poacher Limited <modernpoacher@modernpoacher.com>",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=18.5.0"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
@@ -35,20 +35,25 @@
|
|
|
35
35
|
"prelint": "npm run nvm",
|
|
36
36
|
"lint": "eslint . .storybook --ext .mjs --ext .cjs --ext .jsx",
|
|
37
37
|
"lint:fix": "npm run lint -- --fix",
|
|
38
|
-
"
|
|
38
|
+
"pretest": "npm run nvm",
|
|
39
|
+
"test": "cross-env NODE_ENV=test mocha test --recursive",
|
|
39
40
|
"nvm": "bash nvm.sh",
|
|
40
41
|
"storybook": "npm run build && npm run transform && start-storybook -p 6010"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
44
|
+
"chai": "^4.3.7",
|
|
43
45
|
"debug": "^4.3.4",
|
|
44
|
-
"
|
|
45
|
-
"shinkansen-
|
|
46
|
-
"shinkansen-
|
|
47
|
-
"shinkansen-
|
|
48
|
-
"shinkansen-
|
|
49
|
-
"shinkansen-
|
|
50
|
-
"shinkansen-
|
|
51
|
-
"shinkansen-
|
|
46
|
+
"mocha": "^10.2.0",
|
|
47
|
+
"shinkansen-cogs": "1.5.53",
|
|
48
|
+
"shinkansen-gears": "1.0.41",
|
|
49
|
+
"shinkansen-pantograph": "1.1.9",
|
|
50
|
+
"shinkansen-pinion": "1.0.52",
|
|
51
|
+
"shinkansen-rails": "1.0.25",
|
|
52
|
+
"shinkansen-signals": "1.1.10",
|
|
53
|
+
"shinkansen-sprockets": "1.0.53",
|
|
54
|
+
"shinkansen-transmission": "2.2.5",
|
|
55
|
+
"sinon": "^15.0.4",
|
|
56
|
+
"sinon-chai": "^3.7.0"
|
|
52
57
|
},
|
|
53
58
|
"devDependencies": {
|
|
54
59
|
"@babel/cli": "^7.21.5",
|
|
@@ -61,9 +66,9 @@
|
|
|
61
66
|
"@babel/preset-env": "^7.21.5",
|
|
62
67
|
"@babel/preset-react": "^7.18.6",
|
|
63
68
|
"@babel/register": "^7.21.0",
|
|
64
|
-
"@modernpoacher/design-system": "1.0.
|
|
65
|
-
"@modernpoacher/hooks": "^1.0.
|
|
66
|
-
"@sequencemedia/gulp": "^1.0.
|
|
69
|
+
"@modernpoacher/design-system": "1.0.4",
|
|
70
|
+
"@modernpoacher/hooks": "^1.0.395",
|
|
71
|
+
"@sequencemedia/gulp": "^1.0.7",
|
|
67
72
|
"@storybook/addon-actions": "6.5.12",
|
|
68
73
|
"@storybook/addon-essentials": "6.5.12",
|
|
69
74
|
"@storybook/addon-links": "6.5.12",
|
|
@@ -77,7 +82,7 @@
|
|
|
77
82
|
"del": "^7.0.0",
|
|
78
83
|
"enzyme": "^3.11.0",
|
|
79
84
|
"enzyme-adapter-react-16": "^1.15.7",
|
|
80
|
-
"eslint": "^8.
|
|
85
|
+
"eslint": "^8.40.0",
|
|
81
86
|
"eslint-config-standard": "^17.0.0",
|
|
82
87
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
83
88
|
"eslint-plugin-import": "^2.27.5",
|
|
@@ -109,14 +114,13 @@
|
|
|
109
114
|
"regenerator-runtime": "^0.13.11",
|
|
110
115
|
"rimraf": "^5.0.0",
|
|
111
116
|
"sass": "^1.62.1",
|
|
112
|
-
"vinyl-paths": "
|
|
117
|
+
"vinyl-paths": "^5.0.0"
|
|
113
118
|
},
|
|
114
119
|
"imports": {
|
|
115
120
|
"#build/gulp/build/*": "./build/gulp/build/*.mjs",
|
|
116
121
|
"#build/gulp/build": "./build/gulp/build/index.mjs",
|
|
117
|
-
"#build/gulp/paths": "./build/gulp/paths.mjs",
|
|
118
|
-
"#build/gulp/handle-watch-error": "./build/gulp/handle-watch-error.mjs",
|
|
119
122
|
"#build/gulp/transform": "./build/gulp/transform/index.mjs",
|
|
123
|
+
"#build/gulp/*": "./build/gulp/*.mjs",
|
|
120
124
|
"#build/paths": "./build/paths.mjs"
|
|
121
125
|
},
|
|
122
126
|
"exports": {
|
|
@@ -124,23 +128,33 @@
|
|
|
124
128
|
"require": "./src/index.cjs",
|
|
125
129
|
"import": "./src/index.mjs"
|
|
126
130
|
},
|
|
127
|
-
"./transformers/pinion/check-answers": "./src/transformers/pinion/check-answers/index.mjs",
|
|
128
|
-
"./transformers/pinion/common": "./src/transformers/pinion/common/index.mjs",
|
|
129
|
-
"./transformers/pinion/error-summary": "./src/transformers/pinion/error-summary/index.mjs",
|
|
130
|
-
"./transformers/pinion": "./src/transformers/pinion/index.mjs",
|
|
131
|
-
"./transformers/transmission/from-document-to-hash": "./src/transformers/transmission/from-document-to-hash/index.mjs",
|
|
132
|
-
"./transformers/transmission/from-hash-to-document": "./src/transformers/transmission/from-hash-to-document/index.mjs",
|
|
133
|
-
"./transformers/transmission/to-zashiki": "./src/transformers/transmission/to-zashiki/index.mjs",
|
|
134
|
-
"./transformers/transmission": "./src/transformers/transmission/index.mjs",
|
|
135
131
|
"./components/cogs": "./src/components/cogs/index.cjs",
|
|
136
132
|
"./components/sprockets": "./src/components/sprockets/index.cjs",
|
|
137
133
|
"./components/gears/forward": "./src/components/gears/forward/index.cjs",
|
|
138
134
|
"./components/gears/reverse": "./src/components/gears/forward/index.cjs",
|
|
139
135
|
"./components/gears": "./src/components/gears/index.cjs",
|
|
136
|
+
"./components/pinion/check-answers": {
|
|
137
|
+
"require": "./src/components/pinion/check-answers/index.cjs",
|
|
138
|
+
"import": "./src/components/pinion/check-answers/index.mjs"
|
|
139
|
+
},
|
|
140
|
+
"./components/pinion/common/text-content": "./src/components/pinion/common/text-content/index.cjs",
|
|
141
|
+
"./components/pinion/common": "./src/components/pinion/common/index.mjs",
|
|
142
|
+
"./components/pinion/error-summary": {
|
|
143
|
+
"require": "./src/components/pinion/error-summary/index.cjs",
|
|
144
|
+
"import": "./src/components/pinion/error-summary/index.mjs"
|
|
145
|
+
},
|
|
140
146
|
"./components/pinion": "./src/components/pinion/index.cjs",
|
|
141
147
|
"./components/rails": "./src/components/rails/index.cjs",
|
|
142
148
|
"./components/signals": "./src/components/signals/index.cjs",
|
|
143
149
|
"./components/pantograph": "./src/components/pantograph/index.cjs",
|
|
150
|
+
"./transformers/pinion/check-answers": "./src/transformers/pinion/check-answers/index.mjs",
|
|
151
|
+
"./transformers/pinion/common": "./src/transformers/pinion/common/index.mjs",
|
|
152
|
+
"./transformers/pinion/error-message": "./src/transformers/pinion/error-message/index.mjs",
|
|
153
|
+
"./transformers/pinion": "./src/transformers/pinion/index.mjs",
|
|
154
|
+
"./transformers/transmission/from-document-to-hash": "./src/transformers/transmission/from-document-to-hash/index.mjs",
|
|
155
|
+
"./transformers/transmission/from-hash-to-document": "./src/transformers/transmission/from-hash-to-document/index.mjs",
|
|
156
|
+
"./transformers/transmission/to-zashiki": "./src/transformers/transmission/to-zashiki/index.mjs",
|
|
157
|
+
"./transformers/transmission": "./src/transformers/transmission/index.mjs",
|
|
144
158
|
"./engine": "./src/engine/index.cjs"
|
|
145
159
|
}
|
|
146
160
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
require('@babel/register')
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
2
4
|
|
|
3
5
|
const {
|
|
4
6
|
Gears
|
|
5
7
|
} = require('shinkansen-gears')
|
|
6
8
|
|
|
9
|
+
const log = debug('shinksansen-engine/components/gears')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
7
13
|
module.exports = Gears
|
package/src/components/index.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import debug from 'debug'
|
|
2
|
+
|
|
3
|
+
const log = debug('shinksansen-engine')
|
|
4
|
+
|
|
5
|
+
log('`shinkansen` is awake')
|
|
6
|
+
|
|
1
7
|
export { default as Cogs } from './cogs/index.cjs'
|
|
2
8
|
export { default as Gears } from './gears/index.cjs'
|
|
3
9
|
export { default as Pantograph } from './pantograph/index.cjs'
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
require('@babel/register')
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
2
4
|
|
|
3
5
|
const {
|
|
4
6
|
Pantograph
|
|
5
7
|
} = require('shinkansen-pantograph')
|
|
6
8
|
|
|
9
|
+
const log = debug('shinksansen-engine')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
7
13
|
module.exports = Pantograph
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
default: CheckAnswers
|
|
7
|
+
} = require('shinkansen-pinion/components/check-answers')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinksansen-engine/components/pinion/check-answers')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
module.exports = CheckAnswers
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
4
|
+
|
|
5
|
+
const log = debug('shinksansen-engine/components/pinion/common/text-content')
|
|
6
|
+
|
|
7
|
+
log('`shinkansen` is awake')
|
|
8
|
+
|
|
9
|
+
module.exports = require('shinkansen-pinion/components/common/text-content')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
default: ErrorSummary
|
|
7
|
+
} = require('shinkansen-pinion/components/error-summary')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinksansen-engine/components/pinion/error-summary')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
module.exports = ErrorSummary
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
require('@babel/register')
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
2
4
|
|
|
3
5
|
const {
|
|
4
6
|
default: Pinion
|
|
5
|
-
} = require('shinkansen-pinion/
|
|
7
|
+
} = require('shinkansen-pinion/pinion')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinksansen-engine')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
6
12
|
|
|
7
13
|
module.exports = Pinion
|
|
File without changes
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
require('@babel/register')
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
2
4
|
|
|
3
5
|
const {
|
|
4
6
|
Rails
|
|
5
7
|
} = require('shinkansen-rails')
|
|
6
8
|
|
|
9
|
+
const log = debug('shinksansen-engine')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
7
13
|
module.exports = Rails
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
require('@babel/register')
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
2
4
|
|
|
3
5
|
const {
|
|
4
6
|
Signals
|
|
5
7
|
} = require('shinkansen-signals')
|
|
6
8
|
|
|
9
|
+
const log = debug('shinksansen-engine')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
7
13
|
module.exports = Signals
|
package/src/engine/index.cjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
require('@babel/register')
|
|
1
|
+
require('@babel/register')({ ignore: [] })
|
|
2
|
+
|
|
3
|
+
const debug = require('debug')
|
|
2
4
|
|
|
3
5
|
const {
|
|
4
6
|
default: component
|
|
5
7
|
} = require('./index.jsx')
|
|
6
8
|
|
|
9
|
+
const log = debug('shinksansen-engine')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
7
13
|
module.exports = component
|
package/src/engine/index.jsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Component } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
|
|
4
|
-
import Pinion from '
|
|
5
|
-
import Gears from '
|
|
4
|
+
import Pinion from 'shinkansen-engine/components/pinion'
|
|
5
|
+
import Gears from 'shinkansen-engine/components/gears'
|
|
6
6
|
|
|
7
7
|
export default class Engine extends Component {
|
|
8
8
|
render () {
|
package/src/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require('@babel/register')({ ignore: [] })
|
|
2
2
|
|
|
3
|
+
const debug = require('debug')
|
|
4
|
+
|
|
3
5
|
const Engine = require('./engine/index.cjs')
|
|
4
6
|
|
|
5
7
|
const Cogs = require('./components/cogs/index.cjs')
|
|
@@ -14,6 +16,10 @@ const { default: fromDocumentToHash } = require('./transformers/transmission/fro
|
|
|
14
16
|
const { default: fromHashToDocument } = require('./transformers/transmission/from-hash-to-document/index.mjs')
|
|
15
17
|
const { default: toZashiki } = require('./transformers/transmission/to-zashiki/index.mjs')
|
|
16
18
|
|
|
19
|
+
const log = debug('shinksansen-engine')
|
|
20
|
+
|
|
21
|
+
log('`shinkansen` is awake')
|
|
22
|
+
|
|
17
23
|
module.exports.Engine = Engine
|
|
18
24
|
|
|
19
25
|
module.exports.Cogs = Cogs
|
package/src/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import debug from 'debug'
|
|
2
|
+
|
|
1
3
|
import Cogs from './components/cogs/index.cjs'
|
|
2
4
|
import Sprockets from './components/sprockets/index.cjs'
|
|
3
5
|
import Gears from './components/gears/index.cjs'
|
|
@@ -6,6 +8,10 @@ import Rails from './components/rails/index.cjs'
|
|
|
6
8
|
import Signals from './components/signals/index.cjs'
|
|
7
9
|
import Pantograph from './components/pantograph/index.cjs'
|
|
8
10
|
|
|
11
|
+
const log = debug('shinksansen-engine')
|
|
12
|
+
|
|
13
|
+
log('`shinkansen` is awake')
|
|
14
|
+
|
|
9
15
|
export { default as Engine } from './engine/index.cjs'
|
|
10
16
|
|
|
11
17
|
export {
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import debug from 'debug'
|
|
2
|
+
|
|
3
|
+
const log = debug('shinksansen-engine')
|
|
4
|
+
|
|
5
|
+
log('`shinkansen` is awake')
|
|
6
|
+
|
|
1
7
|
export { default as fromDocumentToHash } from './from-document-to-hash/index.mjs'
|
|
2
8
|
export { default as fromHashToDocument } from './from-hash-to-document/index.mjs'
|
|
3
9
|
export { default as toZashiki } from './to-zashiki/index.mjs'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Cogs from 'shinkansen-engine/components/cogs'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/cogs', () => {
|
|
9
|
+
it('is an object', () => {
|
|
10
|
+
return expect(Cogs)
|
|
11
|
+
.to.be.an('object')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Forward from 'shinkansen-engine/components/gears/forward'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/gears/forward', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Forward)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Gears from 'shinkansen-engine/components/gears'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/gears', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Gears)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Reverse from 'shinkansen-engine/components/gears/reverse'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/gears/reverse', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Reverse)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Pantograph from 'shinkansen-engine/components/pantograph'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/pantograph', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Pantograph)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import CheckAnswers from 'shinkansen-engine/components/pinion/check-answers'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/pinion/check-answers', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(CheckAnswers)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import * as common from 'shinkansen-engine/components/pinion/common'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/pinion/common', () => {
|
|
9
|
+
it('is a module', () => {
|
|
10
|
+
return expect(common)
|
|
11
|
+
.to.be.a('module')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import TextContent from 'shinkansen-engine/components/pinion/common/text-content'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/pinion/common/text-content', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(TextContent)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import ErrorSummary from 'shinkansen-engine/components/pinion/error-summary'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/pinion/error-summary', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(ErrorSummary)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Pinion from 'shinkansen-engine/components/pinion'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/pinion', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Pinion)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Rails from 'shinkansen-engine/components/rails'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/rails', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Rails)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Signals from 'shinkansen-engine/components/signals'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/signals', () => {
|
|
9
|
+
it('is an object', () => {
|
|
10
|
+
return expect(Signals)
|
|
11
|
+
.to.be.an('object')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Sprockets from 'shinkansen-engine/components/sprockets'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/components/sprockets', () => {
|
|
9
|
+
it('is an object', () => {
|
|
10
|
+
return expect(Sprockets)
|
|
11
|
+
.to.be.a('object')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import Engine from 'shinkansen-engine/engine'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/engine', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(Engine)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import * as checkAnswers from 'shinkansen-engine/transformers/pinion/check-answers'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/transformers/pinion/check-answers', () => {
|
|
9
|
+
/**
|
|
10
|
+
* A pass-through from `shinkansen-pinion` so we don't interrogate the module
|
|
11
|
+
*
|
|
12
|
+
* (This project exports exactly what `shinkansen-pinion` exports)
|
|
13
|
+
*/
|
|
14
|
+
it('is a module', () => {
|
|
15
|
+
return expect(checkAnswers)
|
|
16
|
+
.to.be.a('module')
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import * as common from 'shinkansen-engine/transformers/pinion/common'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/transformers/pinion/common', () => {
|
|
9
|
+
/**
|
|
10
|
+
* A pass-through from `shinkansen-pinion` so we don't interrogate the module
|
|
11
|
+
*
|
|
12
|
+
* (This project exports exactly what `shinkansen-pinion` exports)
|
|
13
|
+
*/
|
|
14
|
+
it('is a module', () => {
|
|
15
|
+
return expect(common)
|
|
16
|
+
.to.be.a('module')
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import * as errorMessage from 'shinkansen-engine/transformers/pinion/error-message'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/transformers/pinion/error-message', () => {
|
|
9
|
+
/**
|
|
10
|
+
* A pass-through from `shinkansen-pinion` so we don't interrogate the module
|
|
11
|
+
*
|
|
12
|
+
* (This project exports exactly what `shinkansen-pinion` exports)
|
|
13
|
+
*/
|
|
14
|
+
it('is a module', () => {
|
|
15
|
+
return expect(errorMessage)
|
|
16
|
+
.to.be.a('module')
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import fromDocumentToHash from 'shinkansen-engine/transformers/transmission/from-document-to-hash'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/transformers/transmission/from-document-to-hash', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(fromDocumentToHash)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import fromHashToDocument from 'shinkansen-engine/transformers/transmission/from-hash-to-document'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/transformers/transmission/from-hash-to-document', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(fromHashToDocument)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
fromDocumentToHash,
|
|
6
|
+
fromHashToDocument,
|
|
7
|
+
toZashiki
|
|
8
|
+
} from 'shinkansen-engine/transformers/transmission'
|
|
9
|
+
|
|
10
|
+
chai.use(sinonChai)
|
|
11
|
+
|
|
12
|
+
describe('shinkansen-engine/transformers/transmission', () => {
|
|
13
|
+
it('is a function', () => {
|
|
14
|
+
return expect(fromDocumentToHash)
|
|
15
|
+
.to.be.a('function')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('is a function', () => {
|
|
19
|
+
return expect(fromHashToDocument)
|
|
20
|
+
.to.be.a('function')
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('is a function', () => {
|
|
24
|
+
return expect(toZashiki)
|
|
25
|
+
.to.be.a('function')
|
|
26
|
+
})
|
|
27
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chai, { expect } from 'chai'
|
|
2
|
+
import sinonChai from 'sinon-chai'
|
|
3
|
+
|
|
4
|
+
import toZashiki from 'shinkansen-engine/transformers/transmission/to-zashiki'
|
|
5
|
+
|
|
6
|
+
chai.use(sinonChai)
|
|
7
|
+
|
|
8
|
+
describe('shinkansen-engine/transformers/transmission/to-zashiki', () => {
|
|
9
|
+
it('is a function', () => {
|
|
10
|
+
return expect(toZashiki)
|
|
11
|
+
.to.be.a('function')
|
|
12
|
+
})
|
|
13
|
+
})
|