Skip to content

Commit

Permalink
fix: css extract test case
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Nov 2, 2024
1 parent 98e7010 commit f859218
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/plugin-test/css-extract/TestMemoryFS.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@ describe("TestMemoryFS", () => {
return;
}

// CHANGE: The compilation instance of Rspack will be dropped on the Rust side after compilation.
// So we should obtain all the assets information after the next time the compile.
const names1 = assetsNames(stats1.compilation.getAssets());

compiler.run((err2, stats2) => {
if (err2) {
done(err2);

return;
}

expect(assetsNames(stats1.compilation.getAssets())).toEqual(
assetsNames(stats2.compilation.getAssets())
);
const names2 = assetsNames(stats2.compilation.getAssets());
expect(names1).toEqual(names2);

done();
});
Expand Down

0 comments on commit f859218

Please sign in to comment.