Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
KingSora committed Aug 22, 2020
1 parent a9203c8 commit 464dd57
Show file tree
Hide file tree
Showing 100 changed files with 1,734 additions and 713 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ module.exports = {
'no-continue': 'off',
'no-param-reassign': 'off',
'no-nested-ternary': 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-empty': ['error', { allowEmptyCatch: true }],
'no-cond-assign': ['error', 'except-parens'],
camelcase: ['error', { allow: ['^__', '^UNSAFE_'] }],
'consistent-return': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"jsxBracketSameLine": true,
"arrowParens": "always",
"endOfLine": "lf",
"parser": "babel",
"overrides": [
{
"files": "*.vue",
Expand Down
31 changes: 30 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const resolve = require('./resolve.config');
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
const base = {
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
Expand All @@ -12,3 +12,32 @@ module.exports = {
testPathIgnorePatterns: ['\\\\node_modules\\\\'],
verbose: true,
};

module.exports = {
projects: [
{
...base,
displayName: 'jsdom',
},
// {
// ...base,
// displayName: 'puppeteer',
// globalSetup: './puppeteer.setup.js',
// globalTeardown: './puppeteer.teardown.js',
// testEnvironment: './puppeteer.env.js',
// testMatch: ['**/tests/puppeteer/**/*.[jt]s?(x)'],
// transform: {
// '^.+\\.[jt]sx?$': 'babel-jest',
// '^.+\\.html?$': './jest.html.loader.js',
// },
// globals: {
// async createPage(glob, html, funcs) {
// const page = await glob.__BROWSER__.newPage();
// await page.exposeFunction('evalVar', funcs);
// await page.setContent(fs.readFileSync('./puppeteer.html', 'utf8').replace('{{content}}', html));
// return page;
// },
// },
// },
],
};
Loading

0 comments on commit 464dd57

Please sign in to comment.