Skip to content

Commit

Permalink
test: add corner cases
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Jan 14, 2025
1 parent 63b914d commit c8d9ce5
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion tests/unit/extensions/test_expressjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,30 @@ def test_expressjs_override_node_version(
"lib/node_modules/test-expressjs-project/package.json": "app/package.json",
"lib/node_modules/test-expressjs-project/node_modules": "app/node_modules",
},
id="single file defined",
id="single file defined, no missing files",
),
pytest.param(
["app/app.js", "app/test.js"],
[],
{
"lib/node_modules/test-expressjs-project/.npmrc": "app/.npmrc",
"lib/node_modules/test-expressjs-project/app.js": "app/app.js",
"lib/node_modules/test-expressjs-project/test.js": "app/test.js",
"lib/node_modules/test-expressjs-project/package.json": "app/package.json",
"lib/node_modules/test-expressjs-project/node_modules": "app/node_modules",
},
id="multiple files defined, no missing files",
),
pytest.param(
["app/app.js"],
["app/test.js"],
{
"lib/node_modules/test-expressjs-project/.npmrc": "app/.npmrc",
"lib/node_modules/test-expressjs-project/app.js": "app/app.js",
"lib/node_modules/test-expressjs-project/package.json": "app/package.json",
"lib/node_modules/test-expressjs-project/node_modules": "app/node_modules",
},
id="single file defined, missing test.js file",
),
],
)
Expand Down

0 comments on commit c8d9ce5

Please sign in to comment.