@repodog/jasmine-browser-config
v2.0.3
Published
The Repodog jasmine-browser config module.
Downloads
73
Readme
@repodog/jasmine-browser-config
The Repodog jasmine-browser config.
Install package and peer dependencies
# terminal
npm install @repodog/jasmine-browser-config @repodog/webpack-config @types/jasmine jasmine-browser-runner jasmine-core jasmine-expect --save-dev
Use package
// package.json
{
"scripts": {
"test:browser": "pnpm run test:browser:remove && pnpm run test:browser:build && pnpm run test:browser:run",
"test:browser:build": "webpack --config ./webpack.config.cjs",
"test:browser:debug": "jasmine-browser-runner serve --config=jasmineBrowser.config.cjs --browser chrome",
"test:browser:remove": "del-cli ./tests/browser/dist",
"test:browser:run": "jasmine-browser-runner runSpecs --config=jasmineBrowser.config.cjs",
}
}
// jasmineBrowser.config.cjs
const repodogConfig = require('@repodog/jasmine-browser-config');
module.exports = {
...repodogConfig,
};
// webpack.config.cjs
const swcConfig = require('@repodog/swc-config');
const webpackConfig = require('@repodog/webpack-config/test.cjs');
module.exports = {
...webpackConfig({ compiler: 'babel-loader' }),
// or
...webpackConfig({ compiler: ['swc-loader', swcConfig] }),
};