UNPKG

@cuba-platform/front-generator

Version:
18 lines 866 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const init_1 = require("../init"); const chai_1 = require("chai"); describe('init', function () { it('should collect clients', function () { const clients = (0, init_1.collectClients)('index.ts').sort((a, b) => { return a.name.localeCompare(b.name); }); (0, chai_1.expect)(clients.length).to.eq(5); const genCountOfClient = new Map(); genCountOfClient.set('polymer2', 9); genCountOfClient.set('polymer2-typescript', 6); genCountOfClient.set('react-typescript', 5); genCountOfClient.set('react-native', 1); genCountOfClient.set('sdk', 2); genCountOfClient.forEach((num, client) => (0, chai_1.expect)(clients.find(c => c.name == client).generators.length).eq(num)); }); }); //# sourceMappingURL=init.test.js.map