Update expo application
Build and Push Next App / quality (push) Successful in 1m27s
Build and Push Next App / build-next (push) Successful in 3m58s

This commit is contained in:
Gabriel Brown
2026-06-22 12:13:02 -04:00
parent ddce5efb13
commit 42f95530de
78 changed files with 5315 additions and 421 deletions
+38
View File
@@ -0,0 +1,38 @@
import { describe, expect, test } from 'vitest';
import { parseEnvText } from '../../src/utils/env';
describe('parseEnvText', () => {
test('parses dotenv content without exposing invalid rows', () => {
expect(
parseEnvText(`
# comment
AUTH_SECRET="secret=value"
export authentik_client_id='client'
1INVALID=nope
EMPTY=
`),
).toEqual([
{ name: 'AUTH_SECRET', value: 'secret=value' },
{ name: 'AUTHENTIK_CLIENT_ID', value: 'client' },
{ name: 'EMPTY', value: '' },
]);
});
test('ignores blank lines and strips matching quotes only', () => {
expect(
parseEnvText(`
PLAIN=value
QUOTED="value"
SINGLE='value'
UNMATCHED="value
`),
).toEqual([
{ name: 'PLAIN', value: 'value' },
{ name: 'QUOTED', value: 'value' },
{ name: 'SINGLE', value: 'value' },
{ name: 'UNMATCHED', value: '"value' },
]);
});
});
+31
View File
@@ -0,0 +1,31 @@
import { describe, expect, test } from 'vitest';
import {
formatDate,
formatDateTime,
titleize,
truncate,
} from '../../src/utils/format';
describe('format utilities', () => {
test('formats missing timestamps as never', () => {
expect(formatDate(undefined)).toBe('Never');
expect(formatDateTime(undefined)).toBe('Never');
});
test('formats known timestamps', () => {
const value = Date.UTC(2026, 0, 2, 3, 4, 5);
expect(formatDate(value)).toContain('2026');
expect(formatDateTime(value)).toContain('2026');
});
test('titleizes machine values', () => {
expect(titleize('waiting_for_user')).toBe('waiting for user');
});
test('truncates long text', () => {
expect(truncate('abcdef', 4)).toBe('a...');
expect(truncate('abc', 4)).toBe('abc');
});
});