We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bad6ad commit fbb8ce5Copy full SHA for fbb8ce5
test-lib/cli.test.js
@@ -28,8 +28,11 @@ describe('command line interface', () => {
28
})
29
30
test('should output version', async () => {
31
- expect(await run(`node "${cli}" --version`)).toBe('0.0.0')
32
- expect(await run(`node "${cli}" -v`)).toBe('0.0.0')
+ // a version number like 0.0.0 or 3.1.0
+ const versionRegex = /^\d+\.\d+\.\d+$/
33
+
34
+ expect(await run(`node "${cli}" --version`)).toMatch(versionRegex)
35
+ expect(await run(`node "${cli}" -v`)).toMatch(versionRegex)
36
37
38
test('should output help', async () => {
0 commit comments