-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9e00b6
commit b2bff86
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "demo", | ||
"private": true, | ||
"scripts": { | ||
"start": "base-volta-off-of-nwjs" | ||
}, | ||
"devDependencies": { | ||
"nw": "0.86.0-1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import child_process from 'node:child_process'; | ||
import process from 'node:process'; | ||
|
||
import { test, expect } from 'vitest'; | ||
|
||
test('cli works', async function () { | ||
process.chdir('tests/fixtures/app'); | ||
child_process.execSync('npm start'); | ||
|
||
const NodeManifestPath = path.resolve('package.json'); | ||
const NodeManifestBuffer = await fs.promises.readFile(NodeManifestPath); | ||
const NodeManifest = JSON.parse(NodeManifestBuffer.toString()); | ||
const NodeVersion = NodeManifest.volta.node; | ||
|
||
expect(NodeVersion).toBe('21.1.0'); | ||
}); |