@servant/servant
Version:
Servant builder for node modules.
4 lines (3 loc) • 2.23 kB
TypeScript
export declare const WebIndexTs = "\n/**\n * @summary Entry typescript file for tests in browser\n * @description\n * This is main file that is used as entry file into your tests. If you use Servant for web browser package,\n * its necessary to include all tests file into this file.\n * \n */\n\nimport \"$link(tests/tests)\";\n\n";
export declare const WebTestsTs = "\n/**\n * @summary Entry typescript file for tests\n * @description\n * This is a one of file that contains test for your application. Now there is only one test that check if\n * hello world is written into page.\n * \n */\n\nimport { createScreen } from \"$link(src/index)\";\n\ndescribe(\"check create screen\", () => {\n\n it(\"write servant data and check structure\", () => {\n const div = document.createElement(\"div\");\n\n createScreen(div);\n \n const logo = div.querySelectorAll(\".logo img\");\n expect(logo.length).toBe(1);\n \n const title = div.querySelectorAll(\".title\");\n expect(title.length).toBe(1);\n expect(title[0].textContent).toBe(\"Servant\");\n \n const description = div.querySelectorAll(\".description\");\n expect(description.length).toBe(1);\n expect(description[0].textContent).toBe(\"Servant builder is simple build tool for developers, that wants to build and manage modularized large projects in monorepo or separated into more repositories.\");\n\n div.remove();\n });\n\n});\n\n";
export declare const NodeTestsTs = "\n/**\n * @summary Entry typescript file for tests\n * @description\n * This is a one of file that contains test for your application. Now there is only one test that check if\n * hello world is written into page.\n * \n */\n\nimport { createServer } from \"$link(src/index)\";\n\ndescribe(\"check create server with hello word\", () => {\n\n it(\"create servet on port\", (done) => {\n const listener = createServer(\"127.0.0.1\", 3000, (hostname, port) => {\n expect(listener).toBeDefined();\n expect(hostname).toBe(\"127.0.0.1\");\n expect(port).toBe(3000);\n listener.close(done);\n });\n });\n\n});\n\n";