一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
17 行
519 B
TypeScript
17 行
519 B
TypeScript
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: unknown, shouldSupport) => {
|
|
const callback = () => validatePluginPlatforms(platforms as string[]);
|
|
if (shouldSupport) {
|
|
expect(callback).not.toThrow();
|
|
} else {
|
|
expect(callback).toThrow();
|
|
}
|
|
});
|
|
});
|