Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Disable readConfig tests to unblock CI",
"packageName": "@fluentui/bundle-size",
"email": "lingfan.gao@microsoft.com",
"dependentChangeType": "none"
}
8 changes: 4 additions & 4 deletions packages/bundle-size/src/utils/readConfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('prepareFixture', () => {
});

it('should read config from package', async () => {
setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`);
await setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`);

const config = await readConfig();

Expand All @@ -48,9 +48,9 @@ describe('prepareFixture', () => {
it('should cache config', async () => {
process.env.NODE_ENV = 'nottest';

setup(`module.exports = { webpack: (config) => config }`);
await setup(`module.exports = { webpack: (config) => config }`);
const firstConfig = await readConfig();
setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`);
await setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`);
const config = await readConfig();

expect(firstConfig).toBe(config);
Expand All @@ -60,7 +60,7 @@ describe('prepareFixture', () => {
});

it.each([1, 2, 3])('should cache config for %i layers of nesting', async nesting => {
setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`, nesting);
await setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`, nesting);
const config = await readConfig();

expect(config.webpack({})).toEqual({ foo: 'bar' });
Expand Down