-
richard.petersen authored
Root cause: Version has was updated before file cache Solution: Keep all updates in one place and switch to new version at the same time
richard.petersen authoredRoot cause: Version has was updated before file cache Solution: Keep all updates in one place and switch to new version at the same time
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
manifest_parsing_test.js 3.41 KiB
import { viteToOxManifest } from '../src/util.js'
import { expect } from 'chai'
describe('Vite manifest parsing', function () {
it('should work', function () {
const manifests = viteToOxManifest({
'../io.ox/guidedtours/i18n.de_DE.js': {
file: 'io.ox/guidedtours/i18n.de_DE.js',
src: '../io.ox/guidedtours/i18n.de_DE.js',
isEntry: true,
meta: {}
},
'../io.ox/guidedtours/i18n': {
file: 'io.ox/guidedtours/i18n.3de05d46.js',
src: '../io.ox/guidedtours/i18n',
isEntry: true,
imports: [
'_preload-helper-a7bbbf37.js'
],
meta: {
gettext: {
dictionary: true
},
manifests: [
{
namespace: 'i18n'
}
]
}
},
'io.ox/guidedtours/intro.js': {
file: 'io.ox/guidedtours/intro.e84819a5.js',
src: 'io.ox/guidedtours/intro.js',
isEntry: true,
isDynamicEntry: true,
imports: [
'../io.ox/guidedtours/i18n',
'_preload-helper-a7bbbf37.js'
],
meta: {}
},
'io.ox/guidedtours/main.js': {
file: 'io.ox/guidedtours/main.07676e21.js',
src: 'io.ox/guidedtours/main.js',
isEntry: true,
imports: [
'_preload-helper-a7bbbf37.js',
'../io.ox/guidedtours/i18n'
],
dynamicImports: [
'io.ox/guidedtours/intro.js',
'io.ox/guidedtours/multifactor.js'
],
meta: {
manifests: [
{
namespace: 'settings'
},
{
namespace: 'io.ox/core/main',
title: 'Guided tours',
company: 'Open-Xchange',
icon: '/images/icon.png',
category: 'Dev',
settings: false,
index: 100,
package: 'open-xchange-guidedtours'
}
]
}
},
'io.ox/guidedtours/multifactor.js': {
file: 'io.ox/guidedtours/multifactor.22d3e17d.js',
src: 'io.ox/guidedtours/multifactor.js',
isEntry: true,
isDynamicEntry: true,
imports: [
'_preload-helper-a7bbbf37.js',
'../io.ox/guidedtours/i18n',
'io.ox/guidedtours/main.js'
],
meta: {}
},
'io.ox/guidedtours/utils.js': {
file: 'io.ox/guidedtours/utils.91ad511f.js',
src: 'io.ox/guidedtours/utils.js',
isEntry: true,
imports: [
'_preload-helper-a7bbbf37.js'
],
meta: {}
},
'_preload-helper-a7bbbf37.js': {
file: 'io.ox/guidedtours/preload-helper-a7bbbf37.js'
}
})
expect(Array.isArray(manifests)).to.equal(true)
expect(manifests.length).to.equal(3)
expect(manifests.map(manifest => manifest.path)).to.deep.equal([
'io.ox/guidedtours/i18n.3de05d46',
'io.ox/guidedtours/main.07676e21',
'io.ox/guidedtours/main.07676e21'
])
expect(manifests.map(manifest => manifest.namespace)).to.deep.equal([
'i18n',
'settings',
'io.ox/core/main'
])
expect(manifests.map(manifest => manifest.dependencies)).to.deep.equal([
['io.ox/guidedtours/preload-helper-a7bbbf37.js'],
['io.ox/guidedtours/preload-helper-a7bbbf37.js', 'io.ox/guidedtours/i18n.3de05d46.js'],
['io.ox/guidedtours/preload-helper-a7bbbf37.js', 'io.ox/guidedtours/i18n.3de05d46.js']
])
})
})