@servant/servant
Version:
Servant builder for node modules.
4 lines (3 loc) • 2.2 kB
TypeScript
export declare const WebIndexJs = "\n/**\n * @summary Entry javascript file for tests\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\nrequire(\"$link(tests/tests)\");\n\n";
export declare const WebTestsJs = "\n/**\n * @summary Entry javascript 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\nconst { createScreen } = require(\"$link(src/index)\");\n\ndescribe(\"check create hello word\", () => {\n\n it(\"write hello world into element\", () => {\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 NodeTestsJs = "\n/**\n * @summary Entry javascript 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\nconst { createServer } = require(\"$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";