fix(nx): correct path of TSLint config. Fixes #1435
This change: - fixes path in TSLint config template - add tests coverage for creation and content of the library `tslint.json` configuration file Thanks!
This commit is contained in:
parent
872e969fe4
commit
e65993f005
@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "<%= offsetFromRoot %>/tslint.json",
|
||||
"extends": "<%= offsetFromRoot %>tslint.json",
|
||||
"rules": []
|
||||
}
|
||||
|
||||
@ -150,6 +150,8 @@ describe('lib', () => {
|
||||
expect(
|
||||
tree.exists('libs/my-dir/my-lib/src/lib/my-dir-my-lib.ts')
|
||||
).toBeTruthy();
|
||||
expect(tree.exists('libs/my-dir/my-lib/src/index.ts')).toBeTruthy();
|
||||
expect(tree.exists(`libs/my-dir/my-lib/tslint.json`)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should update angular.json', async () => {
|
||||
@ -209,6 +211,20 @@ describe('lib', () => {
|
||||
include: ['**/*.ts']
|
||||
});
|
||||
});
|
||||
|
||||
it('should create a local tslint.json', async () => {
|
||||
const tree = await runSchematic(
|
||||
'lib',
|
||||
{ name: 'myLib', directory: 'myDir' },
|
||||
appTree
|
||||
);
|
||||
|
||||
const tslintJson = readJsonInTree(tree, 'libs/my-dir/my-lib/tslint.json');
|
||||
expect(tslintJson).toEqual({
|
||||
extends: '../../../tslint.json',
|
||||
rules: []
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('--unit-test-runner none', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user