Skip to content

Test a plugin

Test the plugin independently from the customer website before deployment.

Build checks

Your project should:

  1. Type-check against a pinned SDK package.
  2. Bundle a standalone classic browser script.
  3. Avoid bundling the Icon Visualizer application or importing private application modules.
  4. Produce no top-level side effects beyond plugin registration.
bash
npm run type-check
npm run build

Registration checks

After loading the artifact before the embed, verify:

js
const api = await window.iConfigurator.ready()
const registration = api.getPluginStatus('customer.dealer-recommendation')

console.assert(registration?.status === 'ready')
console.table(api.getSnapshot().pluginErrors)

Exercise every route and UI surface the plugin uses. Confirm that repeated mounts do not duplicate listeners or elements.

Cleanup checks

Unregister the plugin and confirm that it removes:

  • Outlet elements and styles
  • Document and window listeners
  • Timers and observers
  • Open plugin modals
  • External renderer instances
js
window.iConfigurator.unregisterPlugin('customer.dealer-recommendation')

Re-register the same ID after disposal to catch leaked global state.

Icon Visualizer developer documentation