Skip to content

Commit 2132ebf

Browse files
authored
Merge branch 'main' into fix/issue-1-wallet-state-navigation
2 parents 70a2e6f + 1c42fd8 commit 2132ebf

69 files changed

Lines changed: 9585 additions & 3214 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ '**' ]
8+
9+
jobs:
10+
test:
11+
name: Run tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run tests
27+
run: npm test --if-present

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
> A full-stack Next.js 14 dashboard for **Vero Guardians** — trusted on-chain reviewers who cast cryptographically-signed votes on GitHub pull requests via the Stellar blockchain.
44
5+
<!-- CI badges: update OWNER/REPO to your GitHub repo -->
6+
[![CI](https://github.com/OWNER/REPO/actions/workflows/ci.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/ci.yml)
7+
[![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](#)
8+
9+
510
Guardians connect their [Freighter](https://www.freighter.app/) wallet, browse the live PR review feed, and submit approval votes recorded as permanent `manageData` transactions on Stellar Horizon. The system bridges open-source code review with decentralized, verifiable trust.
611

712
---

jest.setup.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
11
import '@testing-library/jest-dom';
22
import './src/i18n/config';
3+
import { installIndexedDBMock } from './test-utils/indexeddb-mock';
4+
5+
// Polyfill crypto.subtle and TextEncoder/TextDecoder for jsdom
6+
if (typeof globalThis.crypto !== 'undefined' && !globalThis.crypto.subtle) {
7+
const { webcrypto } = require('crypto');
8+
Object.defineProperty(globalThis, 'crypto', {
9+
value: webcrypto,
10+
writable: false,
11+
configurable: true,
12+
});
13+
}
14+
const { TextEncoder, TextDecoder } = require('util');
15+
if (typeof globalThis.TextEncoder === 'undefined') {
16+
globalThis.TextEncoder = TextEncoder;
17+
}
18+
if (typeof globalThis.TextDecoder === 'undefined') {
19+
globalThis.TextDecoder = TextDecoder;
20+
}
21+
22+
// Mock File System Access API (showSaveFilePicker)
23+
if (typeof globalThis.window === 'undefined') {
24+
// running in node - provide a minimal window and document
25+
globalThis.window = globalThis;
26+
}
27+
28+
if (!('showSaveFilePicker' in globalThis)) {
29+
globalThis.showSaveFilePicker = async (options = {}) => {
30+
const chunks = [];
31+
return {
32+
createWritable: async () => ({
33+
write: async (data) => {
34+
// accept Blob or write request
35+
if (data instanceof Blob) {
36+
const array = new Uint8Array(await data.arrayBuffer());
37+
chunks.push(array);
38+
} else if (data && data.data instanceof Blob) {
39+
const array = new Uint8Array(await data.data.arrayBuffer());
40+
chunks.push(array);
41+
}
42+
},
43+
close: async () => {},
44+
}),
45+
};
46+
};
47+
}
48+
49+
// Install enhanced IndexedDB mock for tests
50+
try {
51+
installIndexedDBMock();
52+
} catch (e) {
53+
// ignore if already installed or environment prevents it
54+
}

0 commit comments

Comments
 (0)