Yuki Takei 1 год назад
Родитель
Сommit
f3ef008f9d

+ 0 - 39
packages/pluginkit/src/v4/server/utils/theme/validate-growi-plugin-directive.spec.ts

@@ -1,39 +0,0 @@
-import path from 'path';
-
-import { GrowiPluginType } from '@growi/core';
-
-import { validateTemplatePluginGrowiDirective } from './validate-growi-plugin-directive';
-
-
-describe('validateTemplatePluginGrowiDirective()', () => {
-
-  it('returns a data object', async() => {
-    // setup
-    const projectDirRoot = path.resolve(__dirname, '../../../../../test/fixtures/example-package/template1');
-
-    // when
-    const data = validateTemplatePluginGrowiDirective(projectDirRoot);
-
-    // then
-    expect(data).not.toBeNull();
-    expect(data.growiPlugin).not.toBeNull();
-    expect(data.growiPlugin.types).toStrictEqual([GrowiPluginType.Template]);
-    expect(data.growiPlugin.tylocalespes).not.toBeNull();
-  });
-
-  describe('should throw an GrowiPluginValidationError', () => {
-
-    it("when the pkg does not have 'growiPlugin.locale' directive", () => {
-      // setup
-      const projectDirRoot = path.resolve(__dirname, '../../../../../test/fixtures/example-package/invalid-template1');
-
-      // when
-      const caller = () => { validateTemplatePluginGrowiDirective(projectDirRoot) };
-
-      // then
-      expect(caller).toThrow("Template plugin must have 'supportingLocales' and that must have one or more locales");
-    });
-
-  });
-
-});