Fix `npm run test` command
Error was: `Unknown command: "run test"` and checked other usages for
correct way.
https://logs.chromium.org/logs/gerrit/buildbucket/cr-buildbucket/8791800028851285377/+/u/run_tests/stdout
Change-Id: I0fb63fdb732dfae285496ef7ff799abc5cb58e0c
diff --git a/recipes/recipes/luci-test.expected/basic.json b/recipes/recipes/luci-test.expected/basic.json
index acd72f6..58c2766 100644
--- a/recipes/recipes/luci-test.expected/basic.json
+++ b/recipes/recipes/luci-test.expected/basic.json
@@ -219,7 +219,8 @@
{
"cmd": [
"npm",
- "run test"
+ "run",
+ "test"
],
"cwd": "[CACHE]/builder/src",
"env": {
diff --git a/recipes/recipes/luci-test.py b/recipes/recipes/luci-test.py
index 41fd2c6..b298cae 100644
--- a/recipes/recipes/luci-test.py
+++ b/recipes/recipes/luci-test.py
@@ -46,7 +46,7 @@
with api.nodejs(version='18.11.0'):
# Named steps to test the change
api.step('install deps', ['npm', 'install'])
- api.step('run tests', ['npm', 'run test'])
+ api.step('run tests', ['npm', 'run', 'test'])
# Test the recipe and generate the expect json file.