@cloudbase/cals 0.3.25 → 0.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=common-application-specs.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common-application-specs.test.d.ts","sourceRoot":"","sources":["../../tests/common-application-specs.test.ts"],"names":[],"mappings":""}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const ajv_1 = __importDefault(require("ajv"));
7
- const utils_1 = require("../utils");
8
- const platform_application_json_1 = __importDefault(require("../schema/platform_application.json"));
9
- const ajv = new ajv_1.default({
10
- strict: false,
11
- });
12
- describe('common-application-specs', () => {
13
- const validate = ajv.compile(platform_application_json_1.default);
14
- const PAGE = utils_1.EComponentType.PAGE;
15
- it('应用数据', () => {
16
- const app = {
17
- name: 'demo_app',
18
- description: '测试应用',
19
- items: [
20
- {
21
- type: PAGE,
22
- id: 'index',
23
- component: 'page',
24
- items: [
25
- {
26
- component: 'Container',
27
- attributes: {},
28
- items: [
29
- {
30
- component: 'Text',
31
- attributes: {
32
- text: '文本测试',
33
- },
34
- },
35
- ],
36
- },
37
- ],
38
- },
39
- ],
40
- };
41
- const res = validate(app);
42
- console.debug(validate.errors);
43
- expect(res).toBeTruthy();
44
- });
45
- });