@mands/nx-playwright
Advanced tools
Comparing version 0.0.18 to 0.1.0
{ | ||
"name": "@mands/nx-playwright", | ||
"version": "0.0.18", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -32,2 +32,12 @@ "use strict"; | ||
}, | ||
'ts-check': { | ||
executor: '@nrwl/workspace:run-commands', | ||
options: { | ||
commands: [ | ||
{ | ||
command: `yarn tsc --build apps/${options.project}/tsconfig.json`, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
@@ -34,0 +44,0 @@ tags: normalizedOptions.parsedTags, |
@@ -0,5 +1,55 @@ | ||
import type { Tree } from '@nrwl/devkit'; | ||
import { Linter } from '@nrwl/linter'; | ||
import { FsTree } from 'nx/src/generators/tree'; | ||
import generator from './generator'; | ||
describe('nx-playwright generator', () => { | ||
it('noop', async () => { | ||
expect(true).toBe(true); | ||
it('generates correct project.json', async () => { | ||
const host: Tree = new FsTree('.', true); | ||
const generate = await generator(host, { | ||
name: 'test-generator', | ||
linter: Linter.EsLint, | ||
project: 'test-project', | ||
}); | ||
await generate(); | ||
const projectJsonString = host.read('e2e/test-generator/project.json').toString(); | ||
const projectJson = JSON.parse(projectJsonString); | ||
expect(projectJson).toEqual({ | ||
$schema: '../../node_modules/nx/schemas/project-schema.json', | ||
sourceRoot: 'e2e/test-generator/src', | ||
projectType: 'application', | ||
targets: { | ||
e2e: { | ||
executor: '@mands/nx-playwright:playwright-executor', | ||
options: { | ||
e2eFolder: 'e2e/test-generator', | ||
devServerTarget: 'test-project:serve', | ||
}, | ||
configurations: { | ||
production: { | ||
devServerTarget: 'test-project:serve:production', | ||
}, | ||
}, | ||
}, | ||
'ts-check': { | ||
executor: '@nrwl/workspace:run-commands', | ||
options: { | ||
commands: [ | ||
{ | ||
command: `yarn tsc --build apps/test-project/tsconfig.json`, | ||
}, | ||
], | ||
}, | ||
}, | ||
lint: { | ||
executor: '@nrwl/linter:eslint', | ||
outputs: ['{options.outputFile}'], | ||
options: { lintFilePatterns: ['e2e/test-generator/**/*.{ts,tsx,js,jsx}'] }, | ||
}, | ||
}, | ||
tags: [], | ||
implicitDependencies: ['test-project'], | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33178
610