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
13 changes: 0 additions & 13 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,6 @@ jobs:
with:
fetch-depth: 0

- name: Add workspace to Defender exclusions
if: matrix.os == 'windows-latest'
run: |
Add-MpPreference -ExclusionPath "${{ github.workspace }}"

Add-MpPreference -ExclusionProcess "node.exe"

$npmCache = (npm config get cache)
Add-MpPreference -ExclusionPath $npmCache

Set-MpPreference -DisableRealtimeMonitoring $true
shell: powershell

- name: Using Node.js v${{ matrix.node-version }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
Expand Down
49 changes: 1 addition & 48 deletions test/create-webpack-app/init/init.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { existsSync, mkdirSync, readFileSync, writeFileSync } = require("node:fs");
const { cp } = require("node:fs/promises");
const { existsSync, mkdirSync, readFileSync } = require("node:fs");
const path = require("node:path");
const { join, resolve } = require("node:path");
const { createPathDependentUtils, isWindows, uniqueDirectoryForTest } = require("../test.utils");
Expand Down Expand Up @@ -63,56 +62,10 @@ const readFromPkgJSON = (path) => {
const readFromWebpackConfig = (path) => readFileSync(join(path, "webpack.config.js"), "utf8");

describe("create-webpack-app cli", () => {
let dirWithNodeModules;

beforeAll(async () => {
dirWithNodeModules = await uniqueDirectoryForTest();

const { execa } = await import("execa");

writeFileSync(
resolve(dirWithNodeModules, "package.json"),
JSON.stringify({
name: "test",
description: "description",
version: "1.0.0",
dependencies: {
"babel-loader": "latest",
typescript: "latest",
"html-loader": "latest",
"html-webpack-plugin": "latest",
postcss: "latest",
"postcss-loader": "latest",
autoprefixer: "latest",
"sass-loader": "latest",
"less-loader": "latest",
"stylus-loader": "latest",
"mini-css-extract-plugin": "latest",
"style-loader": "latest",
webpack: "latest",
"webpack-cli": "latest",
"webpack-dev-server": "latest",
"workbox-webpack-plugin": "latest",
},
}),
);

const { exitCode } = await execa("npm", ["install"], { cwd: dirWithNodeModules });

if (exitCode !== 0) {
throw new Error("Problem with installation `node_modules` for caching");
}
});

let dir;

beforeEach(async () => {
dir = await uniqueDirectoryForTest();

await cp(resolve(dirWithNodeModules, "./node_modules"), resolve(dir, "./node_modules"), {
recursive: true,
});
await cp(resolve(dirWithNodeModules, "package-lock.json"), resolve(dir, "package-lock.json"));
});

it("should generate default project when nothing is passed", async () => {
Expand Down