diff --git a/src/puter-js/test/apps.test.js b/src/puter-js/test/apps.test.js index 5846e4d75..6ab20ef2d 100644 --- a/src/puter-js/test/apps.test.js +++ b/src/puter-js/test/apps.test.js @@ -37,7 +37,9 @@ window.appsTests = [ }); const fetched = await puter.apps.get(name); assert(Boolean(fetched.maximize_on_start) === true, "maximize_on_start not stored"); - assert(JSON.stringify(fetched.filetype_associations) === JSON.stringify(['.txt', 'image/png']), "filetype_associations not stored"); + // Extensions are canonicalized to the bare lowercase form on + // write ('.txt' → 'txt'); MIME types pass through unchanged. + assert(JSON.stringify(fetched.filetype_associations) === JSON.stringify(['txt', 'image/png']), "filetype_associations not stored"); pass("testCreateOptionsRemap passed"); } catch (error) { fail("testCreateOptionsRemap failed:", error); diff --git a/src/puter-js/tests/api/suites/apps.suite.ts b/src/puter-js/tests/api/suites/apps.suite.ts index 8d9c55ed2..ea01e30fd 100644 --- a/src/puter-js/tests/api/suites/apps.suite.ts +++ b/src/puter-js/tests/api/suites/apps.suite.ts @@ -222,7 +222,9 @@ export default suite('apps', { maximizeOnStart: true, }); const fetched = await t.puter.apps.get('apps-suite-remap'); - t.assert.deepEqual(fetched.filetype_associations, ['.txt', 'image/png']); + // Extensions are canonicalized to the bare lowercase form on write + // ('.txt' → 'txt'); MIME-type associations pass through unchanged. + t.assert.deepEqual(fetched.filetype_associations, ['txt', 'image/png']); t.assert.equal(Boolean(fetched.maximize_on_start), true); }, });