Skip to content

Commit

Permalink
Add sample environment configuration and enhance tests with connectio…
Browse files Browse the repository at this point in the history
…n validation

Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Jan 16, 2025
1 parent 61a5413 commit eb79789
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/api/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VITE_SERVER=
VITE_DB_USER=
VITE_DB_PASS=
VITE_DB_PORT=22
6 changes: 5 additions & 1 deletion src/api/tests/a.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// sum.test.js
import { expect, test } from 'vitest'
import { getConnection } from './state'
import exp from 'constants';

test('adds 1 + 2 to equal 3', () => {
expect(1+2).toBe(3)
const conn = getConnection();
expect(conn).toBeDefined();
expect(1+2).toBe(3);
})
3 changes: 2 additions & 1 deletion src/api/tests/globalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import IBMi from "../IBMi";
import { ENV_CREDS } from "./env";
import { getConnection, setConnection } from "./state";
import { afterAll, beforeAll, expect } from "vitest";
import { CodeForIStorage, ConnectionStorage, VirtualStorage } from "../configuration/storage/CodeForIStorage";
import { CodeForIStorage } from "../configuration/storage/CodeForIStorage";
import { VirtualConfig } from "../configuration/config/VirtualConfig";
import { VirtualStorage } from "../configuration/storage/BaseStorage";

beforeAll(async () => {
const virtualStorage = new VirtualStorage();
Expand Down

0 comments on commit eb79789

Please sign in to comment.