mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-02 19:02:28 +00:00
fix(ci): address failures in lint, login permissions, and unit tests
- Update `scripts/check-hex.js` to ignore `releases/` directory to prevent false positives from PR numbers. - Update `js/nostr/client.js` to request full NIP-07 permissions (including encryption) during login, fixing `tests/nostr-login-permissions.test.mjs`. - Update `tests/hashtag-preferences.test.mjs` to make the mock fetch function consistently return the event, allowing retry logic to be tested correctly. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
0d37880443
commit
5fe938ef9f
3 files changed
+4
-5
No files matched your search
+1
-1
@@ -2079,7 +2079,7 @@ export class NostrClient {
|
||||
}
|
||||
|
||||
const permissionResult = await this.ensureExtensionPermissions(
|
||||
DEFAULT_NIP07_CORE_METHODS,
|
||||
DEFAULT_NIP07_PERMISSION_METHODS,
|
||||
{ context: "login", logMetrics: true, showStatus: false },
|
||||
);
|
||||
if (!permissionResult.ok) {
|
||||
|
||||
@@ -31,7 +31,8 @@ const IGNORED_GLOBS = [
|
||||
'tests/unit/embed-accent.test.mjs',
|
||||
'tests/visual/embed-layout.spec.ts',
|
||||
'ai/**',
|
||||
'**/*.ai'
|
||||
'**/*.ai',
|
||||
'releases/**'
|
||||
];
|
||||
|
||||
const gitArgs = [
|
||||
|
||||
@@ -248,10 +248,8 @@ test(
|
||||
tags: [["encrypted", "nip04"]],
|
||||
};
|
||||
|
||||
let fetchCalls = 0;
|
||||
nostrClient.fetchListIncrementally = async () => {
|
||||
fetchCalls += 1;
|
||||
return fetchCalls === 1 ? [event] : [];
|
||||
return [event];
|
||||
};
|
||||
nostrClient.relays = relayUrls;
|
||||
nostrClient.writeRelays = relayUrls;
|
||||
|
||||
Reference in new issue
Block a user