Skip to content

Commit 092c5db

Browse files
committed
Use it over test
Signed-off-by: worksofliam <[email protected]>
1 parent 85b5e3b commit 092c5db

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/api/tests/suites/connection.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { expect, test, describe, afterAll, beforeAll, it } from 'vitest'
2+
import { expect, describe, afterAll, beforeAll, it } from 'vitest'
33
import { Tools } from '../../Tools';
44
import { disposeConnection, newConnection } from '../globalSetup';
55
import IBMi from '../../IBMi';
@@ -15,7 +15,7 @@ describe(`connection tests`, {concurrent: true}, () => {
1515
disposeConnection(connection);
1616
});
1717

18-
test('sendCommand', async () => {
18+
it('sendCommand', async () => {
1919
const result = await connection.sendCommand({
2020
command: `echo "Hello world"`,
2121
});
@@ -24,7 +24,7 @@ describe(`connection tests`, {concurrent: true}, () => {
2424
expect(result.stdout).toBe('Hello world');
2525
})
2626

27-
test('sendCommand with home directory', async () => {
27+
it('sendCommand with home directory', async () => {
2828
const resultA = await connection.sendCommand({
2929
command: `pwd`,
3030
directory: `/QSYS.LIB`
@@ -50,7 +50,7 @@ describe(`connection tests`, {concurrent: true}, () => {
5050
expect(resultC.stdout).not.toBe('/badnaughty');
5151
});
5252

53-
test('sendCommand with environment variables', async () => {
53+
it('sendCommand with environment variables', async () => {
5454
const result = await connection.sendCommand({
5555
command: `echo "$vara $varB $VARC"`,
5656
env: {
@@ -64,7 +64,7 @@ describe(`connection tests`, {concurrent: true}, () => {
6464
expect(result.stdout).toBe('Hello world cool');
6565
});
6666

67-
test('getTempRemote', () => {
67+
it('getTempRemote', () => {
6868
const fileA = connection.getTempRemote(`/some/file`);
6969
const fileB = connection.getTempRemote(`/some/badfile`);
7070
const fileC = connection.getTempRemote(`/some/file`);
@@ -73,7 +73,7 @@ describe(`connection tests`, {concurrent: true}, () => {
7373
expect(fileA).not.toBe(fileB);
7474
})
7575

76-
test('parseMemberPath (simple)', () => {
76+
it('parseMemberPath (simple)', () => {
7777
const memberA = connection.parserMemberPath(`/thelib/thespf/thembr.mbr`);
7878

7979
expect(memberA?.asp).toBeUndefined();
@@ -84,7 +84,7 @@ describe(`connection tests`, {concurrent: true}, () => {
8484
expect(memberA?.basename).toBe(`THEMBR.MBR`);
8585
})
8686

87-
test('parseMemberPath (ASP)', () => {
87+
it('parseMemberPath (ASP)', () => {
8888
const memberA = connection.parserMemberPath(`/theasp/thelib/thespf/thembr.mbr`);
8989

9090
expect(memberA?.asp).toBe(`THEASP`);
@@ -95,7 +95,7 @@ describe(`connection tests`, {concurrent: true}, () => {
9595
expect(memberA?.basename).toBe(`THEMBR.MBR`);
9696
})
9797

98-
test('parseMemberPath (no root)', () => {
98+
it('parseMemberPath (no root)', () => {
9999
const memberA = connection.parserMemberPath(`thelib/thespf/thembr.mbr`);
100100

101101
expect(memberA?.asp).toBe(undefined);
@@ -106,7 +106,7 @@ describe(`connection tests`, {concurrent: true}, () => {
106106
expect(memberA?.basename).toBe(`THEMBR.MBR`);
107107
});
108108

109-
test('parseMemberPath (no extension)', () => {
109+
it('parseMemberPath (no extension)', () => {
110110
const memberA = connection.parserMemberPath(`/thelib/thespf/thembr`);
111111

112112
expect(memberA?.asp).toBe(undefined);
@@ -121,13 +121,13 @@ describe(`connection tests`, {concurrent: true}, () => {
121121
).toThrow(`Source Type extension is required.`);
122122
});
123123

124-
test('parseMemberPath (invalid length)', () => {
124+
it('parseMemberPath (invalid length)', () => {
125125
expect(
126126
() => { connection.parserMemberPath(`/thespf/thembr.mbr`) }
127127
).toThrow(`Invalid path: /thespf/thembr.mbr. Use format LIB/SPF/NAME.ext`);
128128
});
129129

130-
test('runCommand (ILE)', async () => {
130+
it('runCommand (ILE)', async () => {
131131
const result = await connection.runCommand({
132132
command: `DSPJOB OPTION(*DFNA)`,
133133
environment: `ile`
@@ -137,7 +137,7 @@ describe(`connection tests`, {concurrent: true}, () => {
137137
expect(["JOBPTY", "OUTPTY", "ENDSEV", "DDMCNV", "BRKMSG", "STSMSG", "DEVRCYACN", "TSEPOOL", "PRTKEYFMT", "SRTSEQ"].every(attribute => result.stdout.includes(attribute))).toBe(true);
138138
})
139139

140-
test('runCommand (ILE, with error)', async () => {
140+
it('runCommand (ILE, with error)', async () => {
141141
const result = await connection.runCommand({
142142
command: `CHKOBJ OBJ(QSYS/NOEXIST) OBJTYPE(*DTAARA)`,
143143
noLibList: true
@@ -147,7 +147,7 @@ describe(`connection tests`, {concurrent: true}, () => {
147147
expect(result?.stderr).toBeTruthy();
148148
});
149149

150-
test('runCommand (ILE, custom library list)', async () => { const config = connection.getConfig();
150+
it('runCommand (ILE, custom library list)', async () => { const config = connection.getConfig();
151151

152152
const ogLibl = config!.libraryList.slice(0);
153153

@@ -178,7 +178,7 @@ describe(`connection tests`, {concurrent: true}, () => {
178178
expect(resultB.stdout.includes(`QSYSINC USR`)).toBe(true);
179179
});
180180

181-
test('runCommand (ILE, library list order from variable)', async () => {
181+
it('runCommand (ILE, library list order from variable)', async () => {
182182
const result = await connection?.runCommand({
183183
command: `DSPLIBL`,
184184
environment: `ile`,
@@ -196,7 +196,7 @@ describe(`connection tests`, {concurrent: true}, () => {
196196
expect(qtempIndex < qsysincIndex).toBeTruthy();
197197
});
198198

199-
test('runCommand (ILE, library order from config)', async () => { const config = connection.getConfig();
199+
it('runCommand (ILE, library order from config)', async () => { const config = connection.getConfig();
200200

201201
const ogLibl = config!.libraryList.slice(0);
202202

@@ -218,7 +218,7 @@ describe(`connection tests`, {concurrent: true}, () => {
218218
expect(qtempIndex < qsysincIndex).toBeTruthy();
219219
});
220220

221-
test('withTempDirectory and countFiles', async () => { const content = connection.getContent()!;
221+
it('withTempDirectory and countFiles', async () => { const content = connection.getContent()!;
222222
let temp;
223223

224224
await connection.withTempDirectory(async tempDir => {
@@ -246,7 +246,7 @@ describe(`connection tests`, {concurrent: true}, () => {
246246
}
247247
});
248248

249-
test('upperCaseName', () => {
249+
it('upperCaseName', () => {
250250
{
251251
const variantsBackup = connection.variantChars.local;
252252

0 commit comments

Comments
 (0)