shinkansen-pinion 1.0.71 → 1.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-pinion",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "Shinkansen Pinion",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -35,7 +35,9 @@
35
35
  "lint": "eslint . .storybook --ext .mjs --ext .cjs --ext .jsx --ext .mts --ext .cts",
36
36
  "lint:fix": "npm run lint -- --fix",
37
37
  "pretest": "npm run nvm",
38
- "test": "cross-env NODE_ENV=test jest --collect-coverage false --verbose --run-in-band",
38
+ "test": "npm run test:mocha && npm run test:jest",
39
+ "test:mocha": "cross-env NODE_ENV=test mocha test --recursive",
40
+ "test:jest": "cross-env NODE_ENV=test jest --collect-coverage false --verbose --run-in-band",
39
41
  "nvm": "bash nvm.sh",
40
42
  "storybook": "npm run build && npm run transform && start-storybook -p 6009",
41
43
  "prepare": "husky install"
@@ -53,8 +55,8 @@
53
55
  "@babel/preset-env": "^7.21.5",
54
56
  "@babel/preset-react": "^7.18.6",
55
57
  "@babel/register": "^7.21.0",
56
- "@modernpoacher/design-system": "1.0.7",
57
- "@modernpoacher/hooks": "^1.0.397",
58
+ "@modernpoacher/design-system": "1.0.8",
59
+ "@modernpoacher/hooks": "^1.0.398",
58
60
  "@sequencemedia/gulp": "^1.0.7",
59
61
  "@storybook/addon-actions": "6.5.12",
60
62
  "@storybook/addon-essentials": "6.5.12",
@@ -65,6 +67,7 @@
65
67
  "@typescript-eslint/parser": "^5.59.5",
66
68
  "autoprefixer": "^10.4.14",
67
69
  "babel-plugin-module-resolver": "^5.0.0",
70
+ "chai": "^4.3.7",
68
71
  "core-js": "^3.30.2",
69
72
  "cross-env": "^7.0.3",
70
73
  "cssnano": "^6.0.1",
@@ -89,6 +92,7 @@
89
92
  "gulp-sourcemaps": "^3.0.0",
90
93
  "husky": "^8.0.3",
91
94
  "jest": "^29.5.0",
95
+ "mocha": "^10.2.0",
92
96
  "postcss": "^8.4.23",
93
97
  "postcss-easy-import": "^4.0.0",
94
98
  "postcss-map": "^0.11.0",
@@ -103,10 +107,12 @@
103
107
  "regenerator-runtime": "^0.13.11",
104
108
  "rimraf": "^5.0.0",
105
109
  "sass": "^1.62.1",
106
- "shinkansen-cogs": "1.5.70",
110
+ "shinkansen-cogs": "1.5.71",
107
111
  "shinkansen-rails": "1.0.37",
108
112
  "shinkansen-signals": "1.1.20",
109
113
  "shinkansen-sprockets": "1.0.67",
114
+ "sinon": "^15.0.4",
115
+ "sinon-chai": "^3.7.0",
110
116
  "vinyl-paths": "^5.0.0"
111
117
  },
112
118
  "imports": {
@@ -7,4 +7,3 @@ log('`shinkansen` is awake')
7
7
  export { default as CheckAnswers } from './check-answers/index.cjs'
8
8
  export { default as ErrorSummary } from './error-summary/index.cjs'
9
9
  export { default as Fieldset } from './fieldset/index.cjs'
10
- export { default as Pinion } from '../pinion/index.cjs'
@@ -2,8 +2,12 @@ require('@babel/register')({ ignore: [] })
2
2
 
3
3
  const debug = require('debug')
4
4
 
5
+ const {
6
+ default: component
7
+ } = require('./index.jsx')
8
+
5
9
  const log = debug('shinkansen-pinion/pinion')
6
10
 
7
11
  log('`shinkansen` is awake')
8
12
 
9
- module.exports = require('./index.jsx')
13
+ module.exports = component
@@ -0,0 +1,13 @@
1
+ import chai, { expect } from 'chai'
2
+ import sinonChai from 'sinon-chai'
3
+
4
+ import CheckAnswers from 'shinkansen-pinion/components/check-answers'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/components/check-answers', () => {
9
+ it('is an 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 ErrorSummary from 'shinkansen-pinion/components/error-summary'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/components/error-summary', () => {
9
+ it('is an 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 Fieldset from 'shinkansen-pinion/components/fieldset'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/components/fieldset', () => {
9
+ it('is an function', () => {
10
+ return expect(Fieldset)
11
+ .to.be.a('function')
12
+ })
13
+ })
@@ -0,0 +1,33 @@
1
+ import chai, { expect } from 'chai'
2
+ import sinonChai from 'sinon-chai'
3
+
4
+ import {
5
+ CheckAnswers,
6
+ ErrorSummary,
7
+ Fieldset
8
+ } from 'shinkansen-pinion/components'
9
+
10
+ chai.use(sinonChai)
11
+
12
+ describe('shinkansen-pinion/components', () => {
13
+ describe('`CheckAnswers`', () => {
14
+ it('is a function', () => {
15
+ return expect(CheckAnswers)
16
+ .to.be.a('function')
17
+ })
18
+ })
19
+
20
+ describe('`ErrorSummary`', () => {
21
+ it('is a function', () => {
22
+ return expect(ErrorSummary)
23
+ .to.be.a('function')
24
+ })
25
+ })
26
+
27
+ describe('`Fieldset`', () => {
28
+ it('is a function', () => {
29
+ return expect(Fieldset)
30
+ .to.be.a('function')
31
+ })
32
+ })
33
+ })
@@ -0,0 +1,15 @@
1
+ import chai, { expect } from 'chai'
2
+ import sinonChai from 'sinon-chai'
3
+
4
+ import Pinion from 'shinkansen-pinion/pinion'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/pinion', () => {
9
+ describe('`Pinion`', () => {
10
+ it('is a function', () => {
11
+ return expect(Pinion)
12
+ .to.be.a('function')
13
+ })
14
+ })
15
+ })
@@ -0,0 +1,13 @@
1
+ import chai, { expect } from 'chai'
2
+ import sinonChai from 'sinon-chai'
3
+
4
+ import * as checkAnswers from 'shinkansen-pinion/transformers/check-answers'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/transformers/check-answers', () => {
9
+ it('is a module', () => {
10
+ return expect(checkAnswers)
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 * as common from 'shinkansen-pinion/transformers/common'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/transformers/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 * as errorMessage from 'shinkansen-pinion/transformers/error-message'
5
+
6
+ chai.use(sinonChai)
7
+
8
+ describe('shinkansen-pinion/transformers/error-message', () => {
9
+ it('is a module', () => {
10
+ return expect(errorMessage)
11
+ .to.be.a('module')
12
+ })
13
+ })