Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test
2 changes: 1 addition & 1 deletion config/accounts.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ACCOUNTS = [
* @type {{[account_id: string]: string[]}}
*/
export const ACCOUNT_MAP = {
"account1": ['email.A@example.com', 'email.B@example.com']
"account1": ['email@example.com', 'email.A@example.com', 'email.B@example.com']
} ;

Object.keys(ACCOUNT_MAP).forEach((localId) => assert(ACCOUNTS.find(account => account.sub === localId), `${localId} is specified in map but not in accounts`));
2 changes: 1 addition & 1 deletion util/accountService.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class AccountService {
continue;
}

resolve(AccountService.getAccountById(accountId));
return resolve(AccountService.getAccountById(accountId));
}

throw new Error(`Local account ${expectedMail} not found`);
Expand Down
Loading