Tests cannot import the structure viewer
Upon writing a test that checks if all routes and main menu items appear, I stumbled over several issues with @lauri-codes/materia
- The library is published with uncompiled ECMA6 code. The testing framework expects node module code to be vanilla javascript.
- The import fails in an environment with out WebGL (i.e. the test environment). You check for WebGL, but then continue with the initialisation even if it does not exist (viewer.js, line 199).
- The viewer classes get instantiated upon import as shared instances (ArchiveBrowser.js line 65). That should be done lazily when they are actually required.
- I understand the urge to have an extra npm module, but this makes it hard for other NOMAD devs to make changes. Also politically, it might create some resentment from the higher ups if you publish paid developments outside the NOMAD context. You should think about putting it into our codebase.