You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
import validatePluginPlatforms from './validatePluginPlatforms';
|
||||
|
||||
describe('validatePluginPlatforms', () => {
|
||||
test.each([
|
||||
[['mobile', 'desktop'], true],
|
||||
['not-an-array', false],
|
||||
[[3, 4, 5], false],
|
||||
])('should throw when given an invalid list of supported plugin platforms (case %#)', (platforms: any, shouldSupport) => {
|
||||
const callback = () => validatePluginPlatforms(platforms);
|
||||
if (shouldSupport) {
|
||||
expect(callback).not.toThrow();
|
||||
} else {
|
||||
expect(callback).toThrow();
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user