* install ndb as a development dependency

* Add "debug" script to package.json to launch "ndb"

* Create a minimal test example

This test file is used as an example, we will add later a script in
package.json to call only this file

* Create a temporary npm script to run it from "ndb"

We want to be able to run only a selected file using "ndb", so we need to
create an npm script for it

* Clean up test file

* Clean up & ready PR to merge

Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
This commit is contained in:
Saad Tarhi 2022-03-07 17:10:17 +01:00 committed by GitHub
parent dee5032d41
commit c122008d70
2 changed files with 1420 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -70,6 +70,7 @@
"test:e2e-dev": "npm run wp-env:config && cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --puppeteer-interactive",
"test:e2e-dev-watch": "npm run wp-env:config && cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --watch --puppeteer-interactive",
"test:e2e:update": "npm run wp-env:config && cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --updateSnapshot",
"debug": "ndb .",
"test:help": "wp-scripts test-unit-js --help",
"pretest:php": "npm run wp-env run composer 'install --no-interaction'",
"test:php": "npm run wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/woocommerce-gutenberg-products-block/phpunit.xml.dist'",
@ -179,6 +180,7 @@
"markdown-it": "12.3.2",
"merge-config": "2.0.0",
"mini-css-extract-plugin": "1.3.6",
"ndb": "^1.1.5",
"patch-package": "6.4.7",
"postcss": "8.2.13",
"postcss-loader": "4.2.0",