I have a project that started with the vuetify webpack (vue init vuetifyjs / webpack). At the time the project was created, the e2e / unit testing option was not selected. But now there is a need for testing.
I checked the manual installation of nightwatch first, and installed all necessary dependencies via npm, such as:
npm install --save-dev webpack-dev-server
npm i -D babel-register chromedriver cross-spawn nightwatch selenium-server
I also inserted the script so that it can be executed:
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e"'
However, errors occur through the webpack.dev.conf.js
file. It appears that devConfigPromise.then(devConfig => { TypeError: devConfigPromise.then is not a function
, and really is not, because to check I created another project today from scratch and the file webpack.dev.conf.js
is extremely different from mine, as well as it has the export of a Promise
, among other new dependencies, which is required to resolve this error of devConfigPromise
use .then
.
I would like to know if someone has already happened in a situation like this, and knows of a relatively easy solution to this case, since I tried to "integrate" the webpack.dev.conf.js
of the new project in my old one, however several problems occur, and I arrived in a point that I do not know how to solve.
I tried to search, but I did not find anything about it so far, which in my view is strange, otherwise it ends up like this: Either you start the project with tests, or create another.
If you help, I can post the code of the configuration files, in case of this project there are three for development, webpack.dev.conf.js
, dev-client.js
and dev-server.js
.