mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
tests: Use require()
to load frontend test specs
This makes core and plugin tests consistent with each other, makes it possible to `require()` relative paths in spec files, simplifies the code somewhat, and should make it easier to move away from require-kernel. Also: * Wrap plugin tests inside a `describe()` that contains the plugin name to make it easier to grep for a plugin's tests and for consistency with core tests. * Add "<core>" to the core test descriptions to make it easier to distinguish them from plugin tests.
This commit is contained in:
parent
d8eb79428f
commit
e4f011df76
3 changed files with 38 additions and 38 deletions
|
@ -165,6 +165,8 @@ const minify = async (req, res) => {
|
|||
filename = path.join('../node_modules/', library, libraryPath);
|
||||
}
|
||||
}
|
||||
const [, spec] = /^plugins\/ep_etherpad-lite\/(tests\/frontend\/specs\/.*)/.exec(filename) || [];
|
||||
if (spec != null) filename = `../${spec}`;
|
||||
|
||||
const contentType = mime.lookup(filename);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue