├── .circleci
└── config.yml
├── .dockerignore
├── .editorconfig
├── .eslintignore
├── .eslintrc.json
├── .github
└── workflows
│ ├── docker-publish.yml
│ ├── playwright.yml
│ └── unit-tests.yml
├── .gitignore
├── .gitlab-ci.yml
├── .prettierrc
├── DEVELOPMENT.md
├── Dockerfile
├── Jenkinsfile
├── LICENSE.md
├── README.md
├── azure-pipelines.yml
├── bitbucket-pipelines.yml
├── jest.config.js
├── package-lock.json
├── package.json
├── src
├── ci.ts
├── index.ts
├── prompt.ts
└── providers.ts
├── static
├── azure.hbs
├── bitbucket.hbs
├── circleci.hbs
├── github.hbs
├── gitlab.hbs
└── jenkins.hbs
├── test
├── __snapshots__
│ └── ci.test.ts.snap
├── ci.test.ts
├── launch.js
├── prompt.test.ts
└── saveAll.js
├── tsconfig.json
└── tsconfig.release.json
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | jobs:
3 | build:
4 | docker:
5 | - image: qawolf/playwright-ci:v1.0.0
6 | steps:
7 | - checkout
8 |
9 | - run:
10 | command: npm install
11 |
12 | - run:
13 | command: |
14 | # # Start local server
15 | # npm run start &
16 | # npx wait-on http://localhost:3000
17 | # replace below with command you want to run, example for running a script below
18 | # node myScript.js
19 | npm test
20 |
21 | # # example for running on a schedule, edit to suit your use case
22 | # # documentation: https://circleci.com/docs/2.0/configuration-reference/#schedule
23 | # workflows:
24 | # version: 2
25 | # on_schedule:
26 | # jobs:
27 | # - build
28 | # triggers:
29 | # - schedule:
30 | # # test on schedule using cron syntax
31 | # cron: "0 * * * *" # every hour
32 | # filters:
33 | # branches:
34 | # only:
35 | # - master
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | **
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | trim_trailing_whitespace = true
7 | insert_final_newline = true
8 |
9 | [*.md]
10 | insert_final_newline = false
11 | trim_trailing_whitespace = false
12 |
13 | [*.{js,jsx,json,ts,tsx,yml}]
14 | indent_size = 2
15 | indent_style = space
16 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | /**/*.js
2 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": false,
4 | "es6": true,
5 | "node": true
6 | },
7 | "parser": "@typescript-eslint/parser",
8 | "parserOptions": {
9 | "createDefaultProgram": true,
10 | "project": "tsconfig.json",
11 | "sourceType": "module"
12 | },
13 | "plugins": ["@typescript-eslint", "jest"],
14 | "extends": [
15 | "eslint:recommended",
16 | "plugin:@typescript-eslint/eslint-recommended",
17 | "plugin:@typescript-eslint/recommended",
18 | "plugin:jest/recommended",
19 | "prettier",
20 | "prettier/@typescript-eslint"
21 | ],
22 | "rules": {}
23 | }
24 |
--------------------------------------------------------------------------------
/.github/workflows/docker-publish.yml:
--------------------------------------------------------------------------------
1 | name: publish to docker hub
2 | on:
3 | push:
4 | tags:
5 | - '*'
6 | jobs:
7 | publish:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v2
11 |
12 | - name: build and publish to docker hub
13 | uses: elgohr/Publish-Docker-Github-Action@master
14 | with:
15 | name: qawolf/playwright-ci
16 | username: ${{ secrets.DOCKER_USERNAME }}
17 | password: ${{ secrets.DOCKER_PASSWORD }}
18 | tag_names: true
19 |
--------------------------------------------------------------------------------
/.github/workflows/playwright.yml:
--------------------------------------------------------------------------------
1 | name: playwright
2 | on:
3 | push:
4 | # test every branch
5 | # edit below if you only want certain branches tested
6 | branches: "*"
7 | # schedule:
8 | # # test on schedule using cron syntax
9 | # - cron: "0 * * * *" # every hour
10 | jobs:
11 | test:
12 | runs-on: ubuntu-18.04
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - uses: actions/setup-node@v1
18 |
19 | - uses: microsoft/playwright-github-action@v1
20 |
21 | - uses: actions/cache@v1
22 | with:
23 | path: ~/.npm
24 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
25 | restore-keys: |
26 | ${{ runner.os }}-node-
27 |
28 | - run: npm install
29 |
30 | # - name: Start local server
31 | # run: npm run start & npx wait-on http://localhost:3000
32 |
33 | # replace below with command you want to run, example for running a script below
34 | # - run: node myScript.js
35 | - run: npm test
36 |
--------------------------------------------------------------------------------
/.github/workflows/unit-tests.yml:
--------------------------------------------------------------------------------
1 | name: Unit Tests
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 |
9 | strategy:
10 | fail-fast: false
11 | matrix:
12 | node-version: [10.x]
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 |
17 | - name: Use Node.js ${{ matrix.node-version }}
18 | uses: actions/setup-node@v1
19 | with:
20 | node-version: ${{ matrix.node-version }}
21 |
22 | - uses: actions/cache@v1
23 | with:
24 | path: ~/.npm
25 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26 | restore-keys: |
27 | ${{ runner.os }}-node-
28 |
29 | - run: npm install
30 | - run: npm run lint
31 | - run: npm run build
32 | - run: npm run test:unit
33 |
34 | timeout-minutes: 20
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Dependencies
7 | node_modules/
8 |
9 | # Coverage
10 | coverage
11 |
12 | # Transpiled files
13 | build/
14 |
15 | # VS Code
16 | .vscode
17 | !.vscode/tasks.js
18 |
19 | # JetBrains IDEs
20 | .idea/
21 |
22 | # Optional npm cache directory
23 | .npm
24 |
25 | # Optional eslint cache
26 | .eslintcache
27 |
28 | # Misc
29 | .DS_Store
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | qawolf:
2 | image: qawolf/playwright-ci:v1.0.0
3 |
4 | script:
5 | - npm install
6 | # # Start local server
7 | # - npm run start & npx wait-on http://localhost:3000
8 | # replace below with command you want to run, example for running a script below
9 | # - node myScript.js
10 | - npm test
11 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "all",
4 | "overrides": [
5 | {
6 | "files": "*.ts",
7 | "options": {
8 | "parser": "typescript"
9 | }
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/DEVELOPMENT.md:
--------------------------------------------------------------------------------
1 | # After Template Updates
2 |
3 | 1. Update all CI templates with `node test/saveAll.js`
4 |
5 | 2. Push to all git providers (BitBucket/GitHub/GitLab) and ensure they pass
6 |
7 | 3. Update test snapshots with `npx jest --updateSnapshot`
8 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:bionic
2 |
3 | # 1. Install node12
4 | RUN apt-get update && apt-get install -y curl && \
5 | curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
6 | apt-get install -y nodejs
7 |
8 | # 2. Install WebKit dependencies
9 | RUN apt-get install -y libwoff1 \
10 | libopus0 \
11 | libwebp6 \
12 | libwebpdemux2 \
13 | libenchant1c2a \
14 | libgudev-1.0-0 \
15 | libsecret-1-0 \
16 | libhyphen0 \
17 | libgdk-pixbuf2.0-0 \
18 | libegl1 \
19 | libnotify4 \
20 | libxslt1.1 \
21 | libevent-2.1-6 \
22 | libgles2 \
23 | libvpx5
24 |
25 | # 3. Install Chromium dependencies
26 |
27 | RUN apt-get install -y libnss3 \
28 | libxss1 \
29 | libasound2 \
30 | libgbm-dev
31 |
32 | # 4. Install Firefox dependencies
33 |
34 | RUN apt-get install -y libdbus-glib-1-2 \
35 | libxt6
36 |
37 | # 5. Install ffmpeg to bring in audio and video codecs necessary for playing videos in Firefox.
38 | RUN apt-get install -y ffmpeg
39 |
40 | # Expose it to playwright-video
41 | ENV FFMPEG_PATH=/usr/bin/ffmpeg
42 |
43 | # We skip this step since not running as admin causes problems in certain CIs
44 | # # 6. Add user so we don't need --no-sandbox in Chromium
45 | # RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
46 | # && mkdir -p /home/pwuser/Downloads \
47 | # && chown -R pwuser:pwuser /home/pwuser
48 |
49 | # 7. (Optional) Install XVFB if there's a need to run browsers in headful mode
50 |
51 | RUN apt-get install -y xvfb
52 |
53 | # Install yarn
54 |
55 | RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
56 | echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
57 | apt-get update && \
58 | apt-get install yarn
59 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | pipeline {
2 | agent {
3 | docker {
4 | image 'qawolf/playwright-ci:v1.0.0'
5 | }
6 | }
7 | stages {
8 | stage('Build') {
9 | steps {
10 | sh 'npm install'
11 | }
12 | }
13 | stage('Test') {
14 | steps {
15 | // // Start local server
16 | // sh 'npm run start & npx wait-on http://localhost:3000'
17 | // replace below with command you want to run, example for running a script below
18 | // sh 'node myScript.js'
19 | sh 'npm test'
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019 QA Wolf (https://qawolf.com).
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5 |
6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 |
8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9 |
10 | 3. Neither the name QA Wolf nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11 |
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # playwright-ci
2 |
3 | ☁️ Set up [Playwright](https://github.com/microsoft/playwright) in CI with one command.
4 |
5 | ## Usage
6 |
7 | ```bash
8 | npx playwright-ci
9 |
10 | ? Choose CI Provider (Use arrow keys)
11 | Azure DevOps
12 | Bitbucket Pipelines
13 | CircleCI
14 | ❯ GitHub Actions
15 | GitLab CI/CD
16 | Jenkins
17 | Skip CI setup
18 | ```
19 |
20 | Supported CI providers:
21 |
22 | - [
Azure Devops](https://azure.microsoft.com/en-us/services/devops) [](https://dev.azure.com/perljonathan0753/playwright-ci/_build)
23 | - [
Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) [](https://bitbucket.org/qawolf/playwright-ci/addon/pipelines/home)
24 | - [
CircleCI](https://circleci.com/) [](https://circleci.com/gh/qawolf/playwright-ci)
25 | - [
GitHub Actions](https://github.com/features/actions) [](https://github.com/qawolf/playwright-ci/actions?query=workflow%3Aplaywright)
26 | - [🦊 GitLab CI/CD](https://docs.gitlab.com/ee/ci) [](https://gitlab.com/qawolf/playwright-ci/pipelines)
27 | - [🤵 Jenkins](https://jenkins.io)
28 |
29 | [Chat with us](https://gitter.im/qawolf/community) if you want to run Playwright somewhere else.
30 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | # configure the pipeline to run based on different triggers
2 | # see https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#triggers
3 | pool:
4 | vmImage: "ubuntu-18.04"
5 |
6 | steps:
7 | - task: NodeTool@0
8 | inputs:
9 | versionSpec: "12.x"
10 |
11 | - script: |
12 | sudo apt update
13 | # chromium dependencies
14 | sudo apt-get install libgbm1
15 | # webkit dependencies
16 | sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1
17 | displayName: "Install browser dependencies"
18 |
19 | - script: npm install
20 |
21 | # # Start local server
22 | # - script: npm run start & npx wait-on http://localhost:3000
23 |
24 | # replace below with command you want to run, example for running a script below
25 | # - script: node myScript.js
26 | - script: npm test
27 |
--------------------------------------------------------------------------------
/bitbucket-pipelines.yml:
--------------------------------------------------------------------------------
1 | pipelines:
2 | default:
3 | - step:
4 | name: Playwright Tests
5 | image: qawolf/playwright-ci:v1.0.0
6 | script:
7 | - npm install
8 |
9 | ## Start local server
10 | # - npm run start & npx wait-on http://localhost:3000
11 | # replace below with command you want to run, example for running a script below
12 | # - node myScript.js
13 | - npm test
14 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testEnvironment: 'node',
3 | transform: {
4 | '^.+\\.tsx?$': 'ts-jest',
5 | },
6 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
7 | testRegex: '(/test/.*.(test|spec)).(jsx?|tsx?)$',
8 | coverageDirectory: 'coverage',
9 | collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}', '!src/**/*.d.ts'],
10 | };
11 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "QA Wolf",
3 | "name": "playwright-ci",
4 | "license": "BSD-3.0",
5 | "version": "1.0.0",
6 | "description": "☁️ Set up Playwright in CI with one command",
7 | "main": "./build/index.js",
8 | "types": "./build/index.d.ts",
9 | "files": [
10 | "build",
11 | "src",
12 | "static"
13 | ],
14 | "engines": {
15 | "node": ">=10.15.0"
16 | },
17 | "scripts": {
18 | "clean": "rimraf coverage build tmp",
19 | "build": "tsc -p tsconfig.release.json",
20 | "watch": "tsc -w -p tsconfig.release.json",
21 | "lint": "eslint . --ext .ts,.tsx",
22 | "test": "node ./test/launch.js",
23 | "test:unit": "jest",
24 | "release": "np --no-cleanup",
25 | "release:post": "jest --updateSnapshot && node ./test/saveAll.js",
26 | "version": "npm run clean && npm run build"
27 | },
28 | "peerDependencies": {},
29 | "dependencies": {
30 | "debug": "^4.1.1",
31 | "fs-extra": "^9.0.0",
32 | "handlebars": "^4.7.6",
33 | "inquirer": "^7.1.0",
34 | "tslib": "^1.11.2"
35 | },
36 | "devDependencies": {
37 | "@types/fs-extra": "^8.1.0",
38 | "@types/inquirer": "^6.5.0",
39 | "@types/jest": "^25.2.1",
40 | "@types/node": "^13.13.5",
41 | "@typescript-eslint/eslint-plugin": "~2.31.0",
42 | "@typescript-eslint/parser": "~2.31.0",
43 | "eslint": "~6.8.0",
44 | "eslint-config-prettier": "~6.11.0",
45 | "eslint-plugin-jest": "~23.9.0",
46 | "jest": "~26.0.1",
47 | "np": "^6.2.3",
48 | "playwright": "^1.0.0",
49 | "prettier": "~2.0.5",
50 | "rimraf": "~3.0.2",
51 | "ts-jest": "^25.5.0",
52 | "tsutils": "~3.17.1",
53 | "typescript": "^3.8.3"
54 | },
55 | "bin": {
56 | "playwright-ci": "./build/index.js"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/ci.ts:
--------------------------------------------------------------------------------
1 | import { outputFile, readFileSync } from 'fs-extra';
2 | import { compile } from 'handlebars';
3 | import { join, resolve } from 'path';
4 | import { promptCiProvider } from './prompt';
5 | import { promptOverwrite } from './prompt';
6 | import { CI_PROVIDERS } from './providers';
7 |
8 | // eslint-disable-next-line @typescript-eslint/no-var-requires
9 | const { version } = require('../package');
10 |
11 | interface SaveCiTemplateArgs {
12 | force?: boolean;
13 | provider: string;
14 | qawolf?: boolean;
15 | }
16 |
17 | export const buildCiTemplate = ({
18 | provider,
19 | qawolf,
20 | }: SaveCiTemplateArgs): string => {
21 | const templateFn = compile(
22 | readFileSync(resolve(__dirname, `../static/${provider}.hbs`), 'utf8'),
23 | );
24 |
25 | return templateFn({ qawolf, version });
26 | };
27 |
28 | export const saveCiTemplate = async ({
29 | force,
30 | provider,
31 | qawolf,
32 | }: SaveCiTemplateArgs): Promise => {
33 | const fullProvider = CI_PROVIDERS.find(p => p.name === provider);
34 | if (!fullProvider) {
35 | throw new Error(`No template for CI provider ${provider}`);
36 | }
37 |
38 | const providerPath = qawolf
39 | ? fullProvider.qawolfPath || fullProvider.path
40 | : fullProvider.path;
41 |
42 | const outputPath = join(process.cwd(), providerPath);
43 |
44 | if (!force) {
45 | const shouldOverwrite = await promptOverwrite(outputPath);
46 | if (!shouldOverwrite) return;
47 | }
48 |
49 | const template = buildCiTemplate({ provider, qawolf });
50 | await outputFile(outputPath, template, 'utf8');
51 |
52 | console.log(`Saved ${provider} template to ${outputPath}`);
53 | };
54 |
55 | export const install = async (qawolf = false): Promise => {
56 | const provider = await promptCiProvider();
57 | if (!provider) return;
58 |
59 | await saveCiTemplate({ provider, qawolf });
60 | };
61 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | import { install } from './ci';
3 | const isCLI = !module.parent;
4 |
5 | if (isCLI) {
6 | install();
7 | }
8 |
9 | export { promptOverwrite } from './prompt';
10 | export { install } from './ci';
11 |
--------------------------------------------------------------------------------
/src/prompt.ts:
--------------------------------------------------------------------------------
1 | import inquirer from 'inquirer';
2 | import { pathExists } from 'fs-extra';
3 | import { CI_PROVIDERS } from './providers';
4 |
5 | export const promptConfirmOverwrite = async (
6 | path: string,
7 | ): Promise => {
8 | const answers = await inquirer.prompt([
9 | {
10 | default: false,
11 | message: `"${path}" already exists, overwrite it?`,
12 | name: 'overwrite',
13 | type: 'confirm',
14 | },
15 | ]);
16 |
17 | return answers.overwrite;
18 | };
19 |
20 | export const promptOverwrite = async (path: string): Promise => {
21 | const exists = await pathExists(path);
22 | if (!exists) return true;
23 |
24 | return promptConfirmOverwrite(path);
25 | };
26 |
27 | export const promptCiProvider = async (): Promise => {
28 | const answers = await inquirer.prompt([
29 | {
30 | choices: CI_PROVIDERS.map(provider => {
31 | return { name: provider.label, value: provider.name };
32 | }),
33 | default: 'github',
34 | message: 'Choose CI Provider',
35 | name: 'provider',
36 | type: 'list',
37 | },
38 | ]);
39 |
40 | return answers.provider;
41 | };
42 |
--------------------------------------------------------------------------------
/src/providers.ts:
--------------------------------------------------------------------------------
1 | export const CI_PROVIDERS: Array<{
2 | label: string;
3 | name: string | null;
4 | path: string;
5 | qawolfPath?: string;
6 | }> = [
7 | { label: 'Azure DevOps', name: 'azure', path: 'azure-pipelines.yml' },
8 | {
9 | label: 'Bitbucket Pipelines',
10 | name: 'bitbucket',
11 | path: 'bitbucket-pipelines.yml',
12 | },
13 | { label: 'CircleCI', name: 'circleci', path: '.circleci/config.yml' },
14 | {
15 | label: 'GitHub Actions',
16 | name: 'github',
17 | path: '.github/workflows/playwright.yml',
18 | qawolfPath: '.github/workflows/qawolf.yml',
19 | },
20 | { label: 'GitLab CI/CD', name: 'gitlab', path: '.gitlab-ci.yml' },
21 | { label: 'Jenkins', name: 'jenkins', path: 'Jenkinsfile' },
22 | { label: 'Skip CI setup', name: null, path: '' },
23 | ];
24 |
--------------------------------------------------------------------------------
/static/azure.hbs:
--------------------------------------------------------------------------------
1 | # configure the pipeline to run based on different triggers
2 | # see https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#triggers
3 | pool:
4 | vmImage: "ubuntu-18.04"
5 |
6 | steps:
7 | - task: NodeTool@0
8 | inputs:
9 | versionSpec: "12.x"
10 |
11 | - script: |
12 | sudo apt update
13 | # chromium dependencies
14 | sudo apt-get install libgbm1
15 | # webkit dependencies
16 | sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1
17 | {{#if qawolf}}
18 | # ffmpeg
19 | sudo apt-get install -y ffmpeg
20 | {{/if}}
21 | displayName: "Install browser dependencies"
22 |
23 | - script: npm install
24 |
25 | # # Start local server
26 | # - script: npm run start & npx wait-on http://localhost:3000
27 |
28 | {{#if qawolf}}
29 | - script: npx qawolf test --headless
30 | env:
31 | # configure tests with environment variables
32 | FFMPEG_PATH: /usr/bin/ffmpeg # for recording video
33 | QAW_ARTIFACT_PATH: $(System.DefaultWorkingDirectory)/artifacts
34 |
35 | - publish: $(System.DefaultWorkingDirectory)/artifacts
36 | artifact: artifacts
37 | condition: always()
38 | {{else}}
39 | # replace below with command you want to run, example for running a script below
40 | # - script: node myScript.js
41 | - script: npm test
42 | {{/if}}
--------------------------------------------------------------------------------
/static/bitbucket.hbs:
--------------------------------------------------------------------------------
1 | pipelines:
2 | default:
3 | - step:
4 | {{#if qawolf}}
5 | name: QA Wolf Tests
6 | {{else}}
7 | name: Playwright Tests
8 | {{/if}}
9 | image: qawolf/playwright-ci:v{{{version}}}
10 | script:
11 | - npm install
12 |
13 | ## Start local server
14 | # - npm run start & npx wait-on http://localhost:3000
15 | {{#if qawolf}}
16 | - QAW_ARTIFACT_PATH=artifacts npx qawolf test --headless
17 | {{else}}
18 | # replace below with command you want to run, example for running a script below
19 | # - node myScript.js
20 | - npm test
21 | {{/if}}
22 | {{#if qawolf}}
23 | artifacts:
24 | - artifacts/**
25 | {{/if}}
--------------------------------------------------------------------------------
/static/circleci.hbs:
--------------------------------------------------------------------------------
1 | version: 2
2 | jobs:
3 | build:
4 | docker:
5 | - image: qawolf/playwright-ci:v{{{version}}}
6 | steps:
7 | - checkout
8 |
9 | - run:
10 | command: npm install
11 |
12 | - run:
13 | command: |
14 | # # Start local server
15 | # npm run start &
16 | # npx wait-on http://localhost:3000
17 | {{#if qawolf}}
18 | npx qawolf test --headless
19 | environment:
20 | # configure tests with environment variables
21 | QAW_ARTIFACT_PATH: /tmp/artifacts
22 | - store_artifacts:
23 | path: /tmp/artifacts
24 | {{else}}
25 | # replace below with command you want to run, example for running a script below
26 | # node myScript.js
27 | npm test
28 | {{/if}}
29 |
30 | # # example for running on a schedule, edit to suit your use case
31 | # # documentation: https://circleci.com/docs/2.0/configuration-reference/#schedule
32 | # workflows:
33 | # version: 2
34 | # on_schedule:
35 | # jobs:
36 | # - build
37 | # triggers:
38 | # - schedule:
39 | # # test on schedule using cron syntax
40 | # cron: "0 * * * *" # every hour
41 | # filters:
42 | # branches:
43 | # only:
44 | # - master
--------------------------------------------------------------------------------
/static/github.hbs:
--------------------------------------------------------------------------------
1 | {{#if qawolf}}
2 | name: qawolf
3 | {{else}}
4 | name: playwright
5 | {{/if}}
6 | on:
7 | push:
8 | # test every branch
9 | # edit below if you only want certain branches tested
10 | branches: "*"
11 | # schedule:
12 | # # test on schedule using cron syntax
13 | # - cron: "0 * * * *" # every hour
14 | jobs:
15 | test:
16 | runs-on: ubuntu-18.04
17 |
18 | steps:
19 | - uses: actions/checkout@v2
20 |
21 | - uses: actions/setup-node@v1
22 |
23 | - uses: microsoft/playwright-github-action@v1
24 |
25 | - uses: actions/cache@v1
26 | with:
27 | path: ~/.npm
28 | key: $\{{ runner.os }}-node-$\{{ hashFiles('**/package-lock.json') }}
29 | restore-keys: |
30 | $\{{ runner.os }}-node-
31 |
32 | - run: npm install
33 |
34 | # - name: Start local server
35 | # run: npm run start & npx wait-on http://localhost:3000
36 |
37 | {{#if qawolf}}
38 | - run: npx qawolf test --headless
39 | env:
40 | # configure tests with environment variables
41 | FFMPEG_PATH: /usr/bin/ffmpeg # for recording video
42 | QAW_ARTIFACT_PATH: $\{{ github.workspace }}/artifacts
43 | # you can also use GitHub secrets for environment variables
44 | # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
45 | # LOGIN_PASSWORD: $\{{ secrets.PASSWORD }}
46 |
47 | - name: Upload Artifacts
48 | if: always()
49 | uses: actions/upload-artifact@master
50 | with:
51 | name: qawolf
52 | path: $\{{ github.workspace }}/artifacts
53 | {{else}}
54 | # replace below with command you want to run, example for running a script below
55 | # - run: node myScript.js
56 | - run: npm test
57 | {{/if}}
--------------------------------------------------------------------------------
/static/gitlab.hbs:
--------------------------------------------------------------------------------
1 | qawolf:
2 | image: qawolf/playwright-ci:v{{{version}}}
3 |
4 | script:
5 | - npm install
6 | # # Start local server
7 | # - npm run start & npx wait-on http://localhost:3000
8 | {{#if qawolf}}
9 | - npx qawolf test --headless
10 |
11 | variables:
12 | # configure tests with environment variables
13 | QAW_ARTIFACT_PATH: $CI_PROJECT_DIR/artifacts
14 |
15 | artifacts:
16 | when: always
17 | paths:
18 | - $CI_PROJECT_DIR/artifacts
19 | expire_in: 1 week
20 | {{else}}
21 | # replace below with command you want to run, example for running a script below
22 | # - node myScript.js
23 | - npm test
24 | {{/if}}
--------------------------------------------------------------------------------
/static/jenkins.hbs:
--------------------------------------------------------------------------------
1 | pipeline {
2 | agent {
3 | docker {
4 | image 'qawolf/playwright-ci:v{{{version}}}'
5 | }
6 | }
7 | stages {
8 | stage('Build') {
9 | steps {
10 | sh 'npm install'
11 | }
12 | }
13 | stage('Test') {
14 | {{#if qawolf}}
15 | environment {
16 | // configure tests with environment variables
17 | QAW_ARTIFACT_PATH = './artifacts'
18 | }
19 | {{/if}}
20 | steps {
21 | // // Start local server
22 | // sh 'npm run start & npx wait-on http://localhost:3000'
23 | {{#if qawolf}}
24 | sh 'npx qawolf test --headless'
25 | {{else}}
26 | // replace below with command you want to run, example for running a script below
27 | // sh 'node myScript.js'
28 | sh 'npm test'
29 | {{/if}}
30 | }
31 | }
32 | {{#if qawolf}}
33 | post {
34 | always {
35 | archiveArtifacts(artifacts: 'artifacts/**/*.*', fingerprint: true)
36 | }
37 | }
38 | {{/if}}
39 | }
40 | }
--------------------------------------------------------------------------------
/test/__snapshots__/ci.test.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`buildCiTemplate builds playwright templates: azure 1`] = `
4 | "# configure the pipeline to run based on different triggers
5 | # see https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#triggers
6 | pool:
7 | vmImage: \\"ubuntu-18.04\\"
8 |
9 | steps:
10 | - task: NodeTool@0
11 | inputs:
12 | versionSpec: \\"12.x\\"
13 |
14 | - script: |
15 | sudo apt update
16 | # chromium dependencies
17 | sudo apt-get install libgbm1
18 | # webkit dependencies
19 | sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1
20 | displayName: \\"Install browser dependencies\\"
21 |
22 | - script: npm install
23 |
24 | # # Start local server
25 | # - script: npm run start & npx wait-on http://localhost:3000
26 |
27 | # replace below with command you want to run, example for running a script below
28 | # - script: node myScript.js
29 | - script: npm test
30 | "
31 | `;
32 |
33 | exports[`buildCiTemplate builds playwright templates: bitbucket 1`] = `
34 | "pipelines:
35 | default:
36 | - step:
37 | name: Playwright Tests
38 | image: qawolf/playwright-ci:v1.0.0
39 | script:
40 | - npm install
41 |
42 | ## Start local server
43 | # - npm run start & npx wait-on http://localhost:3000
44 | # replace below with command you want to run, example for running a script below
45 | # - node myScript.js
46 | - npm test
47 | "
48 | `;
49 |
50 | exports[`buildCiTemplate builds playwright templates: circleci 1`] = `
51 | "version: 2
52 | jobs:
53 | build:
54 | docker:
55 | - image: qawolf/playwright-ci:v1.0.0
56 | steps:
57 | - checkout
58 |
59 | - run:
60 | command: npm install
61 |
62 | - run:
63 | command: |
64 | # # Start local server
65 | # npm run start &
66 | # npx wait-on http://localhost:3000
67 | # replace below with command you want to run, example for running a script below
68 | # node myScript.js
69 | npm test
70 |
71 | # # example for running on a schedule, edit to suit your use case
72 | # # documentation: https://circleci.com/docs/2.0/configuration-reference/#schedule
73 | # workflows:
74 | # version: 2
75 | # on_schedule:
76 | # jobs:
77 | # - build
78 | # triggers:
79 | # - schedule:
80 | # # test on schedule using cron syntax
81 | # cron: \\"0 * * * *\\" # every hour
82 | # filters:
83 | # branches:
84 | # only:
85 | # - master"
86 | `;
87 |
88 | exports[`buildCiTemplate builds playwright templates: github 1`] = `
89 | "name: playwright
90 | on:
91 | push:
92 | # test every branch
93 | # edit below if you only want certain branches tested
94 | branches: \\"*\\"
95 | # schedule:
96 | # # test on schedule using cron syntax
97 | # - cron: \\"0 * * * *\\" # every hour
98 | jobs:
99 | test:
100 | runs-on: ubuntu-18.04
101 |
102 | steps:
103 | - uses: actions/checkout@v2
104 |
105 | - uses: actions/setup-node@v1
106 |
107 | - uses: microsoft/playwright-github-action@v1
108 |
109 | - uses: actions/cache@v1
110 | with:
111 | path: ~/.npm
112 | key: \${{ runner.os }}-node-\${{ hashFiles('**/package-lock.json') }}
113 | restore-keys: |
114 | \${{ runner.os }}-node-
115 |
116 | - run: npm install
117 |
118 | # - name: Start local server
119 | # run: npm run start & npx wait-on http://localhost:3000
120 |
121 | # replace below with command you want to run, example for running a script below
122 | # - run: node myScript.js
123 | - run: npm test
124 | "
125 | `;
126 |
127 | exports[`buildCiTemplate builds playwright templates: gitlab 1`] = `
128 | "qawolf:
129 | image: qawolf/playwright-ci:v1.0.0
130 |
131 | script:
132 | - npm install
133 | # # Start local server
134 | # - npm run start & npx wait-on http://localhost:3000
135 | # replace below with command you want to run, example for running a script below
136 | # - node myScript.js
137 | - npm test
138 | "
139 | `;
140 |
141 | exports[`buildCiTemplate builds playwright templates: jenkins 1`] = `
142 | "pipeline {
143 | agent {
144 | docker {
145 | image 'qawolf/playwright-ci:v1.0.0'
146 | }
147 | }
148 | stages {
149 | stage('Build') {
150 | steps {
151 | sh 'npm install'
152 | }
153 | }
154 | stage('Test') {
155 | steps {
156 | // // Start local server
157 | // sh 'npm run start & npx wait-on http://localhost:3000'
158 | // replace below with command you want to run, example for running a script below
159 | // sh 'node myScript.js'
160 | sh 'npm test'
161 | }
162 | }
163 | }
164 | }"
165 | `;
166 |
167 | exports[`buildCiTemplate builds qawolf templates: azure_qawolf 1`] = `
168 | "# configure the pipeline to run based on different triggers
169 | # see https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#triggers
170 | pool:
171 | vmImage: \\"ubuntu-18.04\\"
172 |
173 | steps:
174 | - task: NodeTool@0
175 | inputs:
176 | versionSpec: \\"12.x\\"
177 |
178 | - script: |
179 | sudo apt update
180 | # chromium dependencies
181 | sudo apt-get install libgbm1
182 | # webkit dependencies
183 | sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1
184 | # ffmpeg
185 | sudo apt-get install -y ffmpeg
186 | displayName: \\"Install browser dependencies\\"
187 |
188 | - script: npm install
189 |
190 | # # Start local server
191 | # - script: npm run start & npx wait-on http://localhost:3000
192 |
193 | - script: npx qawolf test --headless
194 | env:
195 | # configure tests with environment variables
196 | FFMPEG_PATH: /usr/bin/ffmpeg # for recording video
197 | QAW_ARTIFACT_PATH: $(System.DefaultWorkingDirectory)/artifacts
198 |
199 | - publish: $(System.DefaultWorkingDirectory)/artifacts
200 | artifact: artifacts
201 | condition: always()
202 | "
203 | `;
204 |
205 | exports[`buildCiTemplate builds qawolf templates: bitbucket_qawolf 1`] = `
206 | "pipelines:
207 | default:
208 | - step:
209 | name: QA Wolf Tests
210 | image: qawolf/playwright-ci:v1.0.0
211 | script:
212 | - npm install
213 |
214 | ## Start local server
215 | # - npm run start & npx wait-on http://localhost:3000
216 | - QAW_ARTIFACT_PATH=artifacts npx qawolf test --headless
217 | artifacts:
218 | - artifacts/**
219 | "
220 | `;
221 |
222 | exports[`buildCiTemplate builds qawolf templates: circleci_qawolf 1`] = `
223 | "version: 2
224 | jobs:
225 | build:
226 | docker:
227 | - image: qawolf/playwright-ci:v1.0.0
228 | steps:
229 | - checkout
230 |
231 | - run:
232 | command: npm install
233 |
234 | - run:
235 | command: |
236 | # # Start local server
237 | # npm run start &
238 | # npx wait-on http://localhost:3000
239 | npx qawolf test --headless
240 | environment:
241 | # configure tests with environment variables
242 | QAW_ARTIFACT_PATH: /tmp/artifacts
243 | - store_artifacts:
244 | path: /tmp/artifacts
245 |
246 | # # example for running on a schedule, edit to suit your use case
247 | # # documentation: https://circleci.com/docs/2.0/configuration-reference/#schedule
248 | # workflows:
249 | # version: 2
250 | # on_schedule:
251 | # jobs:
252 | # - build
253 | # triggers:
254 | # - schedule:
255 | # # test on schedule using cron syntax
256 | # cron: \\"0 * * * *\\" # every hour
257 | # filters:
258 | # branches:
259 | # only:
260 | # - master"
261 | `;
262 |
263 | exports[`buildCiTemplate builds qawolf templates: github_qawolf 1`] = `
264 | "name: qawolf
265 | on:
266 | push:
267 | # test every branch
268 | # edit below if you only want certain branches tested
269 | branches: \\"*\\"
270 | # schedule:
271 | # # test on schedule using cron syntax
272 | # - cron: \\"0 * * * *\\" # every hour
273 | jobs:
274 | test:
275 | runs-on: ubuntu-18.04
276 |
277 | steps:
278 | - uses: actions/checkout@v2
279 |
280 | - uses: actions/setup-node@v1
281 |
282 | - uses: microsoft/playwright-github-action@v1
283 |
284 | - uses: actions/cache@v1
285 | with:
286 | path: ~/.npm
287 | key: \${{ runner.os }}-node-\${{ hashFiles('**/package-lock.json') }}
288 | restore-keys: |
289 | \${{ runner.os }}-node-
290 |
291 | - run: npm install
292 |
293 | # - name: Start local server
294 | # run: npm run start & npx wait-on http://localhost:3000
295 |
296 | - run: npx qawolf test --headless
297 | env:
298 | # configure tests with environment variables
299 | FFMPEG_PATH: /usr/bin/ffmpeg # for recording video
300 | QAW_ARTIFACT_PATH: \${{ github.workspace }}/artifacts
301 | # you can also use GitHub secrets for environment variables
302 | # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
303 | # LOGIN_PASSWORD: \${{ secrets.PASSWORD }}
304 |
305 | - name: Upload Artifacts
306 | if: always()
307 | uses: actions/upload-artifact@master
308 | with:
309 | name: qawolf
310 | path: \${{ github.workspace }}/artifacts
311 | "
312 | `;
313 |
314 | exports[`buildCiTemplate builds qawolf templates: gitlab_qawolf 1`] = `
315 | "qawolf:
316 | image: qawolf/playwright-ci:v1.0.0
317 |
318 | script:
319 | - npm install
320 | # # Start local server
321 | # - npm run start & npx wait-on http://localhost:3000
322 | - npx qawolf test --headless
323 |
324 | variables:
325 | # configure tests with environment variables
326 | QAW_ARTIFACT_PATH: $CI_PROJECT_DIR/artifacts
327 |
328 | artifacts:
329 | when: always
330 | paths:
331 | - $CI_PROJECT_DIR/artifacts
332 | expire_in: 1 week
333 | "
334 | `;
335 |
336 | exports[`buildCiTemplate builds qawolf templates: jenkins_qawolf 1`] = `
337 | "pipeline {
338 | agent {
339 | docker {
340 | image 'qawolf/playwright-ci:v1.0.0'
341 | }
342 | }
343 | stages {
344 | stage('Build') {
345 | steps {
346 | sh 'npm install'
347 | }
348 | }
349 | stage('Test') {
350 | environment {
351 | // configure tests with environment variables
352 | QAW_ARTIFACT_PATH = './artifacts'
353 | }
354 | steps {
355 | // // Start local server
356 | // sh 'npm run start & npx wait-on http://localhost:3000'
357 | sh 'npx qawolf test --headless'
358 | }
359 | }
360 | post {
361 | always {
362 | archiveArtifacts(artifacts: 'artifacts/**/*.*', fingerprint: true)
363 | }
364 | }
365 | }
366 | }"
367 | `;
368 |
--------------------------------------------------------------------------------
/test/ci.test.ts:
--------------------------------------------------------------------------------
1 | import * as ci from '../src/ci';
2 | import { CI_PROVIDERS } from '../src/providers';
3 |
4 | const { buildCiTemplate } = ci;
5 |
6 | describe('buildCiTemplate', () => {
7 | it('builds playwright templates', () => {
8 | CI_PROVIDERS.forEach(item => {
9 | if (!item.name) return;
10 | const provider = item.name;
11 | expect(buildCiTemplate({ provider, qawolf: false })).toMatchSnapshot(
12 | provider,
13 | );
14 | });
15 | });
16 |
17 | it('builds qawolf templates', () => {
18 | CI_PROVIDERS.forEach(item => {
19 | if (!item.name) return;
20 |
21 | const provider = item.name;
22 | expect(buildCiTemplate({ provider, qawolf: true })).toMatchSnapshot(
23 | `${provider}_qawolf`,
24 | );
25 | });
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/test/launch.js:
--------------------------------------------------------------------------------
1 | const pw = require('playwright');
2 |
3 | (async () => {
4 | try {
5 | let browser = await pw.chromium.launch({ args: ['--no-sandbox'] });
6 | let page = await browser.newPage();
7 | console.log('launched chromium');
8 | await page.goto('http://example.org');
9 | await page.click('a');
10 | await browser.close();
11 | console.log('closed chromium');
12 |
13 | browser = await pw.firefox.launch();
14 | page = await browser.newPage();
15 | console.log('launched firefox');
16 | await page.goto('http://example.org');
17 | await page.click('a');
18 | await browser.close();
19 | console.log('closed firefox');
20 |
21 | browser = await pw.webkit.launch();
22 | page = await browser.newPage();
23 | console.log('launched webkit');
24 | await page.goto('http://example.org');
25 | await page.click('a');
26 | await browser.close();
27 | console.log('closed webkit');
28 | } catch (error) {
29 | console.log('error launching browsers', error);
30 | process.exit(1);
31 | }
32 | })();
33 |
--------------------------------------------------------------------------------
/test/prompt.test.ts:
--------------------------------------------------------------------------------
1 | import * as fsExtra from 'fs-extra';
2 | import * as prompt from '../src/prompt';
3 |
4 | const { promptOverwrite } = prompt;
5 |
6 | jest.mock('fs-extra');
7 |
8 | /* eslint-disable @typescript-eslint/no-explicit-any */
9 | describe('promptOverwrite', () => {
10 | afterAll(() => jest.restoreAllMocks());
11 |
12 | it('returns true if path does not exist', async () => {
13 | jest.spyOn(fsExtra, 'pathExists').mockReturnValue(false as any);
14 |
15 | const shouldSave = await promptOverwrite('myTest.test.js');
16 | expect(shouldSave).toBe(true);
17 | });
18 |
19 | it('returns true if path exists but can overwrite', async () => {
20 | jest.spyOn(fsExtra, 'pathExists').mockReturnValue(true as any);
21 | jest
22 | .spyOn(prompt, 'promptConfirmOverwrite')
23 | .mockReturnValue(new Promise(resolve => resolve(true)));
24 |
25 | const shouldSave = await promptOverwrite('myTest.test.js');
26 | expect(shouldSave).toBe(true);
27 | });
28 |
29 | it('returns false if path exists and cannot overwrite', async () => {
30 | jest.spyOn(fsExtra, 'pathExists').mockReturnValue(true as any);
31 | jest
32 | .spyOn(prompt, 'promptConfirmOverwrite')
33 | .mockReturnValue(new Promise(resolve => resolve(false)));
34 |
35 | const shouldSave = await promptOverwrite('myTest.test.js');
36 | expect(shouldSave).toBe(false);
37 | });
38 | });
39 | /* eslint-enable @typescript-eslint/no-explicit-any */
40 |
--------------------------------------------------------------------------------
/test/saveAll.js:
--------------------------------------------------------------------------------
1 | const { CI_PROVIDERS } = require('../build/providers');
2 | const { saveCiTemplate } = require('../build/ci');
3 |
4 | CI_PROVIDERS.forEach(async ({ name }) => {
5 | if (!name) return;
6 |
7 | await saveCiTemplate({ force: true, provider: name });
8 | });
9 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "module": "commonjs",
5 | "moduleResolution": "node",
6 | "allowSyntheticDefaultImports": true,
7 | "allowJs": true,
8 | "importHelpers": true,
9 | "jsx": "react",
10 | "alwaysStrict": true,
11 | "sourceMap": true,
12 | "forceConsistentCasingInFileNames": true,
13 | "noFallthroughCasesInSwitch": true,
14 | "noImplicitReturns": true,
15 | "noUnusedLocals": true,
16 | "noUnusedParameters": true,
17 | "noImplicitAny": false,
18 | "noImplicitThis": false,
19 | "skipLibCheck": true,
20 | "strictNullChecks": false,
21 | "declaration": true,
22 | "esModuleInterop": true
23 | },
24 | "include": ["src/**/*", "test/**/*"]
25 | }
26 |
--------------------------------------------------------------------------------
/tsconfig.release.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "src",
5 | "outDir": "build",
6 | "removeComments": true
7 | },
8 | "include": ["src/**/*"]
9 | }
10 |
--------------------------------------------------------------------------------