Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklafrance committed Jan 23, 2024
1 parent fb80708 commit 2351abb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ exports[`defineBuildRemoteModuleConfig includes react-router and msw dependencie

exports[`defineDevHostConfig includes react-router and msw dependencies 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ exports[`defineBuildRemoteModuleConfig when the router is react-router, add reac

exports[`defineDevHostConfig the application name is set as the federation plugin application name 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -627,7 +627,7 @@ exports[`defineDevHostConfig the application name is set as the federation plugi

exports[`defineDevHostConfig the module federation plugin configuration includes the default shared dependencies 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -669,7 +669,7 @@ exports[`defineDevHostConfig when a public path option is provided for the html

exports[`defineDevHostConfig when additional options are provided for an existing default shared dependency, add the consumer options to the default options 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -699,7 +699,7 @@ exports[`defineDevHostConfig when additional options are provided for an existin

exports[`defineDevHostConfig when additional shared dependencies are provided, add the dependencies to the module federation plugin configuration 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -736,7 +736,7 @@ exports[`defineDevHostConfig when additional shared dependencies are provided, a

exports[`defineDevHostConfig when i18next is activated, add i18next shared dependency and requiredVersion: false to the react shared dependency definition 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -770,7 +770,7 @@ exports[`defineDevHostConfig when i18next is activated, add i18next shared depen

exports[`defineDevHostConfig when msw is activated, add msw shared dependency 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -829,7 +829,7 @@ exports[`defineDevHostConfig when options others than the public path option are

exports[`defineDevHostConfig when overriding options are provided for a default shared dependency, use the consumer option 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down Expand Up @@ -859,7 +859,7 @@ exports[`defineDevHostConfig when overriding options are provided for a default

exports[`defineDevHostConfig when the router is react-router, add react-router shared dependencies 1`] = `
{
"index": 2,
"index": 3,
"plugin": ModuleFederationPlugin {
"_options": {
"name": "host",
Expand Down
7 changes: 0 additions & 7 deletions packages/webpack-configs/tests/defineConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ describe("defineDevHostConfig", () => {
expect(config.output?.publicPath).toBe("http://localhost:8080/");
});

test("fast refresh is disabled", () => {
const config = defineDevHostConfig(SwcConfig, "host", 8080);
const result = findPlugin(config, matchConstructorName("ReactRefreshWebpackPlugin"));

expect(result).toBeUndefined();
});

test("the module federation plugin configuration includes the default shared dependencies", () => {
const config = defineDevHostConfig(SwcConfig, "host", 8080);
const result = findPlugin(config, matchConstructorName(webpack.container.ModuleFederationPlugin.name));
Expand Down

0 comments on commit 2351abb

Please sign in to comment.