diff --git a/integration/setup.js b/integration/setup.js index 1e7d481f..338a50eb 100644 --- a/integration/setup.js +++ b/integration/setup.js @@ -6,7 +6,4 @@ const buildDemo = () => exec('npm run build:demo:test', undefined, resolve); }); -module.exports = async jestConfig => { - await buildDemo(); - await setupPuppeteer(jestConfig); -}; +module.exports = jestConfig => Promise.all([buildDemo(), setupPuppeteer(jestConfig)]); diff --git a/package-lock.json b/package-lock.json index 36e7a271..3aa81d88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6332,6 +6332,21 @@ "mime-db": ">= 1.38.0 < 2" } }, + "compression": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", + "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.14", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -6350,12 +6365,43 @@ "typedarray": "^0.0.6" } }, + "connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + } + }, "connect-history-api-fallback": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", "dev": true }, + "connect-static-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-static-file/-/connect-static-file-2.0.0.tgz", + "integrity": "sha512-5T375Jo/uradjCNDN07uyMNepcADZzPIUoxg+Th/eVbVoWbc+ULhwaK7Ssluby2YwDZqBh4JqHXrP23LagB4Vw==", + "dev": true, + "requires": { + "accepts": "^1.2.5", + "mime": "^1.3.4", + "send": "^0.16.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } + } + }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", @@ -8174,6 +8220,21 @@ } } }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, "find-cache-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", @@ -15546,6 +15607,27 @@ } } }, + "pushstate-server": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pushstate-server/-/pushstate-server-3.1.0.tgz", + "integrity": "sha512-CVUZoKFInwsjiTmg2UdLyBsF3ciR0vf47x5/+KYv0xlzDZqCeI9APwblSYvCDroUQUTnmoDTZKNe5u/ste1D3Q==", + "dev": true, + "requires": { + "compression": "1.7.3", + "connect": "3.6.6", + "connect-static-file": "2.0.0", + "minimist": "1.2.0", + "serve-static": "1.13.2" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "q-i": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/q-i/-/q-i-2.0.1.tgz", @@ -17315,6 +17397,12 @@ } } }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", diff --git a/package.json b/package.json index b441dcdd..d8d20177 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "lint": "tslint -c tslint.json 'src/**/*.{ts,tsx}' --project tsconfig.json", "prepush": "npm run test & npm run build", "prettier": "prettier --config prettier.config.js --write 'src/**/*.{ts,tsx}'", + "serve:test": "pushstate-server -d integration/styleguide -p 6065", "start": "styleguidist server", "test": "npm run lint && npm run test:unit", "test:unit": "cross-env NODE_ENV=test jest", @@ -90,6 +91,7 @@ "material-design-icons": "^3.0.1", "prettier": "^1.15.3", "puppeteer": "^1.13.0", + "pushstate-server": "^3.0.1", "react": "~16.8.0", "react-docgen-typescript": "^1.12.3", "react-dom": "^16.8.0",