From f62a075a8e5d9f373edfabd6896700f89843d305 Mon Sep 17 00:00:00 2001 From: "stephane lacoin (aka nxmatic)" Date: Fri, 12 Jan 2024 23:33:48 +0000 Subject: [PATCH] bumped to nodejs 18 (commonJS support for tests with babel and declaring ...) --- package.json | 3 ++- test/features/step_definitions/{about.js => about.cjs} | 0 .../{designer-live-preview.js => designer-live-preview.cjs} | 0 test/features/step_definitions/{display.js => display.cjs} | 0 .../step_definitions/{navigation.js => navigation.cjs} | 0 test/features/step_definitions/{platform.js => platform.cjs} | 0 test/features/step_definitions/{restart.js => restart.cjs} | 0 test/features/step_definitions/{search.js => search.cjs} | 0 test/features/step_definitions/{studio.js => studio.cjs} | 0 .../step_definitions/support/{client.js => client.cjs} | 0 .../step_definitions/support/fixtures/{auth.js => auth.cjs} | 0 .../support/fixtures/{documents.js => documents.cjs} | 0 .../step_definitions/support/fixtures/{mocks.js => mocks.cjs} | 0 .../step_definitions/support/fixtures/{nav.js => nav.cjs} | 0 .../features/step_definitions/support/{hooks.js => hooks.cjs} | 0 test/features/step_definitions/{toggles.js => toggles.cjs} | 0 test/{injecter.js => injecter.cjs} | 0 wdio.conf.js => wdio.conf.cjs | 4 ++-- 18 files changed, 4 insertions(+), 3 deletions(-) rename test/features/step_definitions/{about.js => about.cjs} (100%) rename test/features/step_definitions/{designer-live-preview.js => designer-live-preview.cjs} (100%) rename test/features/step_definitions/{display.js => display.cjs} (100%) rename test/features/step_definitions/{navigation.js => navigation.cjs} (100%) rename test/features/step_definitions/{platform.js => platform.cjs} (100%) rename test/features/step_definitions/{restart.js => restart.cjs} (100%) rename test/features/step_definitions/{search.js => search.cjs} (100%) rename test/features/step_definitions/{studio.js => studio.cjs} (100%) rename test/features/step_definitions/support/{client.js => client.cjs} (100%) rename test/features/step_definitions/support/fixtures/{auth.js => auth.cjs} (100%) rename test/features/step_definitions/support/fixtures/{documents.js => documents.cjs} (100%) rename test/features/step_definitions/support/fixtures/{mocks.js => mocks.cjs} (100%) rename test/features/step_definitions/support/fixtures/{nav.js => nav.cjs} (100%) rename test/features/step_definitions/support/{hooks.js => hooks.cjs} (100%) rename test/features/step_definitions/{toggles.js => toggles.cjs} (100%) rename test/{injecter.js => injecter.cjs} (100%) rename wdio.conf.js => wdio.conf.cjs (98%) diff --git a/package.json b/package.json index 56a01470..2629ad09 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "nuxeo-extension", + "type": "module", "private": true, "engines": { "node": ">=10.12.0" @@ -61,7 +62,7 @@ "build": "gulp clean build", "gulp": "gulp", "watch": "gulp watch", - "test": "./node_modules/.bin/wdio wdio.conf.js" + "test": "./node_modules/.bin/wdio wdio.conf.cjs" }, "dependencies": { "chai": "^4.2.0", diff --git a/test/features/step_definitions/about.js b/test/features/step_definitions/about.cjs similarity index 100% rename from test/features/step_definitions/about.js rename to test/features/step_definitions/about.cjs diff --git a/test/features/step_definitions/designer-live-preview.js b/test/features/step_definitions/designer-live-preview.cjs similarity index 100% rename from test/features/step_definitions/designer-live-preview.js rename to test/features/step_definitions/designer-live-preview.cjs diff --git a/test/features/step_definitions/display.js b/test/features/step_definitions/display.cjs similarity index 100% rename from test/features/step_definitions/display.js rename to test/features/step_definitions/display.cjs diff --git a/test/features/step_definitions/navigation.js b/test/features/step_definitions/navigation.cjs similarity index 100% rename from test/features/step_definitions/navigation.js rename to test/features/step_definitions/navigation.cjs diff --git a/test/features/step_definitions/platform.js b/test/features/step_definitions/platform.cjs similarity index 100% rename from test/features/step_definitions/platform.js rename to test/features/step_definitions/platform.cjs diff --git a/test/features/step_definitions/restart.js b/test/features/step_definitions/restart.cjs similarity index 100% rename from test/features/step_definitions/restart.js rename to test/features/step_definitions/restart.cjs diff --git a/test/features/step_definitions/search.js b/test/features/step_definitions/search.cjs similarity index 100% rename from test/features/step_definitions/search.js rename to test/features/step_definitions/search.cjs diff --git a/test/features/step_definitions/studio.js b/test/features/step_definitions/studio.cjs similarity index 100% rename from test/features/step_definitions/studio.js rename to test/features/step_definitions/studio.cjs diff --git a/test/features/step_definitions/support/client.js b/test/features/step_definitions/support/client.cjs similarity index 100% rename from test/features/step_definitions/support/client.js rename to test/features/step_definitions/support/client.cjs diff --git a/test/features/step_definitions/support/fixtures/auth.js b/test/features/step_definitions/support/fixtures/auth.cjs similarity index 100% rename from test/features/step_definitions/support/fixtures/auth.js rename to test/features/step_definitions/support/fixtures/auth.cjs diff --git a/test/features/step_definitions/support/fixtures/documents.js b/test/features/step_definitions/support/fixtures/documents.cjs similarity index 100% rename from test/features/step_definitions/support/fixtures/documents.js rename to test/features/step_definitions/support/fixtures/documents.cjs diff --git a/test/features/step_definitions/support/fixtures/mocks.js b/test/features/step_definitions/support/fixtures/mocks.cjs similarity index 100% rename from test/features/step_definitions/support/fixtures/mocks.js rename to test/features/step_definitions/support/fixtures/mocks.cjs diff --git a/test/features/step_definitions/support/fixtures/nav.js b/test/features/step_definitions/support/fixtures/nav.cjs similarity index 100% rename from test/features/step_definitions/support/fixtures/nav.js rename to test/features/step_definitions/support/fixtures/nav.cjs diff --git a/test/features/step_definitions/support/hooks.js b/test/features/step_definitions/support/hooks.cjs similarity index 100% rename from test/features/step_definitions/support/hooks.js rename to test/features/step_definitions/support/hooks.cjs diff --git a/test/features/step_definitions/toggles.js b/test/features/step_definitions/toggles.cjs similarity index 100% rename from test/features/step_definitions/toggles.js rename to test/features/step_definitions/toggles.cjs diff --git a/test/injecter.js b/test/injecter.cjs similarity index 100% rename from test/injecter.js rename to test/injecter.cjs diff --git a/wdio.conf.js b/wdio.conf.cjs similarity index 98% rename from wdio.conf.js rename to wdio.conf.cjs index c7618b4f..468be9de 100644 --- a/wdio.conf.js +++ b/wdio.conf.cjs @@ -1,4 +1,4 @@ -const nuxeo = require('./test/features/step_definitions/support/client.js').nuxeo; +const nuxeo = require('./test/features/step_definitions/support/client.cjs').nuxeo; const path = require('path'); exports.config = { @@ -167,7 +167,7 @@ exports.config = { // // If you are using Cucumber you need to specify the location of your step definitions. cucumberOpts: { - require: ['./test/features/step_definitions/*.js'], // (file/dir) require files before executing features + require: ['./test/features/step_definitions/*.cjs'], // (file/dir) require files before executing features backtrace: true, // show full backtrace for errors compiler: [], // ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable) dryRun: false, // invoke formatters without executing steps