Skip to content

Commit

Permalink
use inlineSnapshot for optimize-deps test
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Nov 29, 2023
1 parent d7cf5b5 commit fe8318a
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions packages/vite/tests/optimize-deps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ describe('optimizeDeps', function () {
test('should produce default output when invoked without arguments', function () {
const actual = optimizeDeps();

const expected = {
exclude: ['@embroider/macros'],
};

expect(actual).toEqual(expected);
expect(actual).toMatchInlineSnapshot(
{
exclude: ['@embroider/macros'],
esbuildOptions: {
plugins: [expect.any(Object)],
},
},
`
{
"esbuildOptions": {
"plugins": [
Any<Object>,
],
},
"exclude": [
"@embroider/macros",
],
}
`
);
});
});

0 comments on commit fe8318a

Please sign in to comment.