Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mands/nx-playwright

Package Overview
Dependencies
Maintainers
4
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mands/nx-playwright - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

package.json
{
"name": "@mands/nx-playwright",
"version": "0.5.0",
"version": "0.5.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -165,2 +165,55 @@ import { addProjectConfiguration, readJson, updateWorkspaceConfiguration } from '@nrwl/devkit';

});
it('generates correct .eslintrc.json', async () => {
const host = createTree();
await generator(host, {
name: 'test-generator',
linter: Linter.EsLint,
project: 'test-project',
});
const eslintJson = readJson(host, 'e2e/test-generator/.eslintrc.json');
expect(eslintJson).toEqual({
extends: ['../../.eslintrc.json'],
ignorePatterns: ['!**/*'],
overrides: [
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: { 'jest/no-done-callback': 'off' },
},
{
files: ['*.ts', '*.tsx'],
rules: { 'jest/no-done-callback': 'off' },
},
{
files: ['*.js', '*.jsx'],
rules: {},
},
],
});
});
it('adds an override for AXE tests to .eslintrc.json when includeAxe option is present', async () => {
const host = createTree();
await generator(host, {
name: 'test-generator',
linter: Linter.EsLint,
project: 'test-project',
includeAxe: true,
});
const eslintJson = readJson(host, 'e2e/test-generator/.eslintrc.json');
expect(eslintJson).toEqual({
extends: ['../../.eslintrc.json'],
ignorePatterns: ['!**/*'],
overrides: expect.arrayContaining([
{
files: ['**/axe-tests/axe-tests.spec.ts'],
rules: { 'jest/expect-expect': 'off' },
},
]),
});
});
});

@@ -167,0 +220,0 @@

@@ -19,6 +19,14 @@ "use strict";

(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), (json) => {
const overrides = json.overrides.map(({ files, rules }) => files.includes('*.ts')
const baseOverrides = json.overrides.map(({ files, rules }) => files.includes('*.ts')
? { files, rules: { 'jest/no-done-callback': 'off' } }
: { files, rules });
return Object.assign(Object.assign({}, json), { overrides, extends: [...json.extends] });
return Object.assign(Object.assign({}, json), { overrides: options.includeAxe
? [
...baseOverrides,
{
files: ['**/axe-tests/axe-tests.spec.ts'],
rules: { 'jest/expect-expect': 'off' },
},
]
: baseOverrides, extends: [...json.extends] });
});

@@ -25,0 +33,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc