Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/codemod

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/codemod

A codemod to transform test files written in Protractor into WebdriverIO tests

  • 0.12.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

WebdriverIO Codemod Test

This project contains various codemods to help migrating from either one major WebdriverIO version to another or from a specific framework to WebdriverIO. It can be used with jscodeshift and currently supports the following migrations:

If you run into any issues during your migration please let us know.

Install

To transform your spec files, you need to install the following packages:

$ npm install jscodeshift @wdio/codemod

Usage

To transform you code, run:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/<framework> <path>
# e.g. to migrate from v5 to v6
$ npx jscodeshift -t ./node_modules/@wdio/codemod/v6 ./e2e/
# e.g. to migrate from v6 to v7:
$ npx jscodeshift -t ./node_modules/@wdio/codemod/v7 ./e2e/
# e.g. to transform Protractor code:
$ npx jscodeshift -t ./node_modules/@wdio/codemod/protractor ./e2e/
# e.g. to tranform from sync to async
$ npx jscodeshift -t ./node_modules/@wdio/codemod/async ./e2e/

If you use TypeScript make sure you apply a different parser as parameter, e.g.:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/protractor --parser=tsx ./e2e/*.ts

If you use a different line terminator from your os, you can override it as parameter, e.g.:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/async --printOptions='{\"lineTerminator\":\"\n\"}' ./e2e/

You can transform tests as well as config files, e.g.:

Codemod Usage Example

Keywords

FAQs

Package last updated on 20 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc