We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 212e175 commit 3857d2eCopy full SHA for 3857d2e
test/nuxt/setup.ts
@@ -23,4 +23,14 @@ if (typeof window !== 'undefined') {
23
removeColorScheme: () => {},
24
}
25
26
+
27
+ // force npm search provider in tests for compatibility with our mocks
28
+ const settingsKey = 'npmx-settings'
29
+ try {
30
+ const existing = JSON.parse(localStorage.getItem(settingsKey) || '{}')
31
+ existing.searchProvider = 'npm'
32
+ localStorage.setItem(settingsKey, JSON.stringify(existing))
33
+ } catch {
34
+ localStorage.setItem(settingsKey, JSON.stringify({ searchProvider: 'npm' }))
35
+ }
36
0 commit comments