|
1 | 1 | import { Tree, readJson } from '@nx/devkit';
|
2 | 2 | import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
3 | 3 | import { convertEslintJsonToFlatConfig } from './json-converter';
|
| 4 | +import { EOL } from 'node:os'; |
4 | 5 |
|
5 | 6 | describe('convertEslintJsonToFlatConfig', () => {
|
6 | 7 | let tree: Tree;
|
@@ -63,7 +64,7 @@ describe('convertEslintJsonToFlatConfig', () => {
|
63 | 64 | })
|
64 | 65 | );
|
65 | 66 |
|
66 |
| - tree.write('.eslintignore', 'node_modules\nsomething/else'); |
| 67 | + tree.write('.eslintignore', `node_modules${EOL}something/else`); |
67 | 68 |
|
68 | 69 | const { content } = convertEslintJsonToFlatConfig(
|
69 | 70 | tree,
|
@@ -227,7 +228,7 @@ describe('convertEslintJsonToFlatConfig', () => {
|
227 | 228 | })
|
228 | 229 | );
|
229 | 230 |
|
230 |
| - tree.write('mylib/.eslintignore', 'node_modules\nsomething/else'); |
| 231 | + tree.write('mylib/.eslintignore', `node_modules${EOL}something/else`); |
231 | 232 |
|
232 | 233 | const { content } = convertEslintJsonToFlatConfig(
|
233 | 234 | tree,
|
@@ -376,7 +377,7 @@ describe('convertEslintJsonToFlatConfig', () => {
|
376 | 377 | })
|
377 | 378 | );
|
378 | 379 |
|
379 |
| - tree.write('.eslintignore', 'node_modules\nsomething/else'); |
| 380 | + tree.write('.eslintignore', `node_modules${EOL}something/else`); |
380 | 381 |
|
381 | 382 | const { content } = convertEslintJsonToFlatConfig(
|
382 | 383 | tree,
|
@@ -537,7 +538,7 @@ describe('convertEslintJsonToFlatConfig', () => {
|
537 | 538 | })
|
538 | 539 | );
|
539 | 540 |
|
540 |
| - tree.write('mylib/.eslintignore', 'node_modules\nsomething/else'); |
| 541 | + tree.write('mylib/.eslintignore', `node_modules${EOL}something/else`); |
541 | 542 |
|
542 | 543 | const { content } = convertEslintJsonToFlatConfig(
|
543 | 544 | tree,
|
|
0 commit comments