-
-
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.
🧪 test: replace 'test' with 'it' in all test files to align with Vite…
…st conventions
- Loading branch information
Showing
10 changed files
with
127 additions
and
127 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxa } from '../../src/commands' | ||
|
||
const agent = 'bun' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'bun')) | ||
test('foo', _('foo', 'bun foo')) | ||
test('run test', _('run test', 'bun run test')) | ||
it('empty', _('', 'bun')) | ||
it('foo', _('foo', 'bun foo')) | ||
it('run test', _('run test', 'bun run test')) |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxa } from '../../src/commands' | ||
|
||
const agent = 'npm' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'npm')) | ||
test('foo', _('foo', 'npm foo')) | ||
test('run test', _('run test', 'npm run test')) | ||
it('empty', _('', 'npm')) | ||
it('foo', _('foo', 'npm foo')) | ||
it('run test', _('run test', 'npm run test')) |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxa } from '../../src/commands' | ||
|
||
const agent = 'pnpm' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'pnpm')) | ||
test('foo', _('foo', 'pnpm foo')) | ||
test('run test', _('run test', 'pnpm run test')) | ||
it('empty', _('', 'pnpm')) | ||
it('foo', _('foo', 'pnpm foo')) | ||
it('run test', _('run test', 'pnpm run test')) |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxa } from '../../src/commands' | ||
|
||
const agent = 'yarn' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'yarn')) | ||
test('foo', _('foo', 'yarn foo')) | ||
test('run test', _('run test', 'yarn run test')) | ||
it('empty', _('', 'yarn')) | ||
it('foo', _('foo', 'yarn foo')) | ||
it('run test', _('run test', 'yarn run test')) |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxa } from '../../src/commands' | ||
|
||
const agent = 'yarn@berry' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxa(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'yarn')) | ||
test('foo', _('foo', 'yarn foo')) | ||
test('run test', _('run test', 'yarn run test')) | ||
it('empty', _('', 'yarn')) | ||
it('foo', _('foo', 'yarn foo')) | ||
it('run test', _('run test', 'yarn run test')) |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxi } from '../../src/commands' | ||
|
||
const agent = 'bun' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'bun install')) | ||
it('empty', _('', 'bun install')) | ||
|
||
test('single add', _('axios', 'bun add axios')) | ||
it('single add', _('axios', 'bun add axios')) | ||
|
||
test('add dev', _('vite -D', 'bun add vite -d')) | ||
it('add dev', _('vite -D', 'bun add vite -d')) | ||
|
||
test('multiple', _('eslint @types/node', 'bun add eslint @types/node')) | ||
it('multiple', _('eslint @types/node', 'bun add eslint @types/node')) | ||
|
||
test('global', _('eslint -g', 'bun add -g eslint')) | ||
it('global', _('eslint -g', 'bun add -g eslint')) | ||
|
||
test('frozen', _('--frozen', 'bun install --no-save')) | ||
it('frozen', _('--frozen', 'bun install --no-save')) |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxi } from '../../src/commands' | ||
|
||
const agent = 'npm' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'npm i')) | ||
it('empty', _('', 'npm i')) | ||
|
||
test('single add', _('axios', 'npm i axios')) | ||
it('single add', _('axios', 'npm i axios')) | ||
|
||
test('multiple', _('eslint @types/node', 'npm i eslint @types/node')) | ||
it('multiple', _('eslint @types/node', 'npm i eslint @types/node')) | ||
|
||
test('-D', _('eslint @types/node -D', 'npm i eslint @types/node -D')) | ||
it('-D', _('eslint @types/node -D', 'npm i eslint @types/node -D')) | ||
|
||
test('global', _('eslint -g', 'npm i -g eslint')) | ||
it('global', _('eslint -g', 'npm i -g eslint')) | ||
|
||
test('frozen', _('--frozen', 'npm ci')) | ||
it('frozen', _('--frozen', 'npm ci')) |
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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxi } from '../../src/commands' | ||
|
||
const agent = 'pnpm' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'pnpm i')) | ||
it('empty', _('', 'pnpm i')) | ||
|
||
test('single add', _('axios', 'pnpm add axios')) | ||
it('single add', _('axios', 'pnpm add axios')) | ||
|
||
test('multiple', _('eslint @types/node', 'pnpm add eslint @types/node')) | ||
it('multiple', _('eslint @types/node', 'pnpm add eslint @types/node')) | ||
|
||
test('-D', _('-D eslint @types/node', 'pnpm add -D eslint @types/node')) | ||
it('-D', _('-D eslint @types/node', 'pnpm add -D eslint @types/node')) | ||
|
||
test('global', _('eslint -g', 'pnpm add -g eslint')) | ||
it('global', _('eslint -g', 'pnpm add -g eslint')) | ||
|
||
test('frozen', _('--frozen', 'pnpm i --frozen-lockfile')) | ||
it('frozen', _('--frozen', 'pnpm i --frozen-lockfile')) | ||
|
||
test('forward1', _('--anything', 'pnpm i --anything')) | ||
test('forward2', _('-a', 'pnpm i -a')) | ||
it('forward1', _('--anything', 'pnpm i --anything')) | ||
it('forward2', _('-a', 'pnpm i -a')) |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { expect, test } from 'vitest' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxi } from '../../src/commands' | ||
|
||
const agent = 'yarn' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxi(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'yarn install')) | ||
it('empty', _('', 'yarn install')) | ||
|
||
test('single add', _('axios', 'yarn add axios')) | ||
it('single add', _('axios', 'yarn add axios')) | ||
|
||
test('multiple', _('eslint @types/node', 'yarn add eslint @types/node')) | ||
it('multiple', _('eslint @types/node', 'yarn add eslint @types/node')) | ||
|
||
test('-D', _('eslint @types/node -D', 'yarn add eslint @types/node -D')) | ||
it('-D', _('eslint @types/node -D', 'yarn add eslint @types/node -D')) | ||
|
||
test('global', _('eslint nyxi -g', 'yarn global add eslint nyxi')) | ||
it('global', _('eslint nyxi -g', 'yarn global add eslint nyxi')) | ||
|
||
test('frozen', _('--frozen', 'yarn install --frozen-lockfile')) | ||
it('frozen', _('--frozen', 'yarn install --frozen-lockfile')) |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import { expect, test } from 'vitest' | ||
import { parseNr } from '../../src/commands' | ||
import { expect, it } from 'vitest' | ||
import { parseNyxr } from '../../src/commands' | ||
|
||
const agent = 'yarn@berry' | ||
function _(arg: string, expected: string) { | ||
return () => { | ||
expect( | ||
parseNr(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
return () => { | ||
expect( | ||
parseNyxr(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
} | ||
|
||
test('empty', _('', 'yarn run start')) | ||
it('empty', _('', 'yarn run start')) | ||
|
||
test('if-present', _('test --if-present', 'yarn run --if-present test')) | ||
it('if-present', _('test --if-present', 'yarn run --if-present test')) | ||
|
||
test('script', _('dev', 'yarn run dev')) | ||
it('script', _('dev', 'yarn run dev')) | ||
|
||
test('script with arguments', _('build --watch -o', 'yarn run build --watch -o')) | ||
it('script with arguments', _('build --watch -o', 'yarn run build --watch -o')) | ||
|
||
test('colon', _('build:dev', 'yarn run build:dev')) | ||
it('colon', _('build:dev', 'yarn run build:dev')) |