Skip to content

Commit 9e4b885

Browse files
committed
fix: getTestEntrypoint
1 parent 93c5892 commit 9e4b885

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nativescript.webpack.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { join, dirname } = require('path');
22
const { existsSync } = require('fs');
33
const { merge } = require('webpack-merge');
44

5-
function getTestEntrypoint() {
5+
function getTestEntrypoint(webpack) {
66
const testTsEntryPath = join(webpack.Utils.platform.getEntryDirPath(), 'test.ts');
77
const testJsEntryPath = join(webpack.Utils.platform.getEntryDirPath(), 'test.js');
88
if (existsSync(testTsEntryPath)) {
@@ -18,7 +18,7 @@ function getTestEntrypoint() {
1818
* @param {typeof import("@nativescript/webpack")} webpack
1919
*/
2020
module.exports = webpack => {
21-
if (!getTestEntrypoint()) {
21+
if (!getTestEntrypoint(webpack)) {
2222
webpack.Utils.log.warn('Test entrypoint not found. Loading deprecated @nativescript/unit-test-runner config. Please update your unit testing config.');
2323
return require('./nativescript.webpack.compat')(webpack);
2424
}
@@ -35,7 +35,7 @@ module.exports = webpack => {
3535
*/
3636
function setupUnitTestBuild(config, env, webpack) {
3737

38-
const testEntrypointPath = getTestEntrypoint();
38+
const testEntrypointPath = getTestEntrypoint(webpack);
3939
if (!testEntrypointPath) { // this should never happen
4040
webpack.Utils.log.error('No test entrypoint found');
4141
return;

0 commit comments

Comments
 (0)