Skip to content

Commit

Permalink
docs: document typescript init
Browse files Browse the repository at this point in the history
  • Loading branch information
vobu committed Jul 8, 2022
1 parent a91ca20 commit 2f0f95b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ The installation of `wdi5` and WebdriverIO can either be done by using (a) `npm

## a) quickstart with `npm init wdi5`

<!-- tabs:start -->

#### **JavaScript**

```shell
$> cd any/ui5/app
$> npm init wdi5
Expand All @@ -26,11 +30,30 @@ This will
- set an `npm` script named "wdi5" to run `wdi5`
so you can immediately do `npm run wdi5`

#### **TypeScript**

```shell
$> cd any/ui5/app
$> npm init wdi5 -- --ts
# yeah, it's "-- --ts" b/c of the way
# `npm init` works:
# https://docs.npmjs.com/cli/v8/commands/npm-init#forwarding-additional-options
```

This will

- install `wdi5` and all required WebdriverIO peer dependencies
- add config files (`wdio.conf.ts` + `tsconfig.json`) to a folder `test` in your current working directory
- look for tests to run in `$ui5-app/test/**/*`
that follow the name pattern `*.test.js`
- set an `npm` script named "wdi5" to run `wdi5`
so you can immediately do `npm run wdi5`
<!-- tabs:end -->

Note this is a _minimal_ install for running `wdi5`

- locally
- with `Chrome` as target browser
- plain JavaScript as notation
- `mocha` as the syntax for tests
- `spec` as the output format of the test results

Expand Down

0 comments on commit 2f0f95b

Please sign in to comment.