Skip to content

Commit d92da49

Browse files
committed
test(plugin-eslint): fix integration test by not matching version exactly
1 parent 11f1a41 commit d92da49

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/plugin-eslint/src/lib/__snapshots__/eslint-plugin.integration.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Custom options:
718718
},
719719
"slug": "eslint",
720720
"title": "ESLint",
721-
"version": "0.0.1",
721+
"version": Any<String>,
722722
}
723723
`;
724724
@@ -1246,6 +1246,6 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
12461246
},
12471247
"slug": "eslint",
12481248
"title": "ESLint",
1249-
"version": "0.0.1",
1249+
"version": Any<String>,
12501250
}
12511251
`;

packages/plugin-eslint/src/lib/eslint-plugin.integration.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ describe('eslintPlugin', () => {
4747
eslintrc: '.eslintrc.js',
4848
patterns: ['src/**/*.js', 'src/**/*.jsx'],
4949
});
50-
expect(replaceAbsolutePath(plugin)).toMatchSnapshot();
50+
expect(replaceAbsolutePath(plugin)).toMatchSnapshot({
51+
version: expect.any(String),
52+
});
5153
});
5254

5355
it('should initialize ESLint plugin for Nx project', async () => {
@@ -56,7 +58,9 @@ describe('eslintPlugin', () => {
5658
eslintrc: './packages/utils/.eslintrc.json',
5759
patterns: ['packages/utils/**/*.ts', 'packages/utils/**/*.json'],
5860
});
59-
expect(replaceAbsolutePath(plugin)).toMatchSnapshot();
61+
expect(replaceAbsolutePath(plugin)).toMatchSnapshot({
62+
version: expect.any(String),
63+
});
6064
});
6165

6266
it('should throw when invalid parameters provided', async () => {

0 commit comments

Comments
 (0)