Skip to content

Commit

Permalink
chore: align multiStats
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Feb 28, 2024
1 parent a4ad96a commit 8b34a83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions packages/rspack/tests/MultiStats.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { createFsFromVolume, Volume } from "memfs";
import { rspack } from "..";
"use strict";

require("./helpers/warmup-webpack");

const { createFsFromVolume, Volume } = require("memfs");

describe("MultiStats", () => {
it("should create JSON of children stats", done => {
const compiler = rspack([
const webpack = require("..");
const compiler = webpack([
{
context: __dirname,
entry: "./fixtures/a"
Expand All @@ -17,7 +21,7 @@ describe("MultiStats", () => {
compiler.run((err, stats) => {
if (err) return done(err);
try {
const statsObject = stats!.toJson();
const statsObject = stats.toJson();
expect(statsObject).toEqual(
expect.objectContaining({ children: expect.any(Array) })
);
Expand Down
4 changes: 2 additions & 2 deletions webpack-test/MultiStats.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"use strict";

// require("./helpers/warmup-webpack");
require("./helpers/warmup-webpack");

const { createFsFromVolume, Volume } = require("memfs");

describe("MultiStats", () => {
it("should create JSON of children stats", done => {
const webpack = require("@rspack/core").rspack;
const webpack = require("..");
const compiler = webpack([
{
context: __dirname,
Expand Down

0 comments on commit 8b34a83

Please sign in to comment.