]> git.codecow.com Git - nano-pow.git/commitdiff
Fix test page imports.
authorChris Duncan <chris@codecow.com>
Fri, 22 May 2026 19:35:42 +0000 (12:35 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 22 May 2026 19:35:42 +0000 (12:35 -0700)
test/index.html

index c0a873f84d786d4d7d31cf57474a8a5e3dd3bdfc..f77018e593f7b812cf4996a775b1d1fa9fb27444 100644 (file)
@@ -9,17 +9,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
        <link rel="icon" href="#">
        <script type="module">
        try {
-               let NanoPow, stats
+               let NanoPow, Cache, stats
                try {
                        ({ NanoPow } = await import('../dist/index.js'))
                } catch (err) {
                        console.warn(err)
                        try {
-                               ({ NanoPow, stats } = await import('https://unpkg.com/nano-pow@5.1/dist/index.js'))
+                               ({ NanoPow } = await import('https://unpkg.com/nano-pow@5.1/dist/index.js'))
                        } catch (err) {
                                console.warn(err)
                                try {
-                                       ({ NanoPow, stats } = await import('https://cdn.jsdelivr.net/npm/nano-pow@5.1/dist/index.js'))
+                                       ({ NanoPow } = await import('https://cdn.jsdelivr.net/npm/nano-pow@5.1/dist/index.js'))
                                } catch (err) {
                                        throw new Error(`Failed to load NanoPow ${err}`)
                                }
@@ -27,15 +27,15 @@ SPDX-License-Identifier: GPL-3.0-or-later
                }
 
                try {
-                       ({ stats } = await import('../dist/utils/index.js'))
+                       ({ Cache, stats } = await import('../dist/utils/index.js'))
                } catch (err) {
                        console.warn(err)
                        try {
-                               ({ NanoPow, stats } = await import('https://unpkg.com/nano-pow@5.1/dist/utils/index.js'))
+                               ({ Cache, stats } = await import('https://unpkg.com/nano-pow@5.1/dist/utils/index.js'))
                        } catch (err) {
                                console.warn(err)
                                try {
-                                       ({ NanoPow, stats } = await import('https://cdn.jsdelivr.net/npm/nano-pow@5.1/dist/utils/index.js'))
+                                       ({ Cache, stats } = await import('https://cdn.jsdelivr.net/npm/nano-pow@5.1/dist/utils/index.js'))
                                } catch (err) {
                                        throw new Error(`Failed to load NanoPow ${err}`)
                                }