# cypress-pseudo-localization

> A plugin that allows to transform regular strings into their [pseudo-localized](https://en.wikipedia.org/wiki/Pseudolocalization) variant. It's a wrapper around a small fork of https://github.com/tryggvigy/pseudo-localization.

Latest version **1.0.0** (published 2021-12-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install cypress-pseudo-localization
pnpm add cypress-pseudo-localization
yarn add cypress-pseudo-localization
bun add cypress-pseudo-localization
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-12-29 |
| First published | 2021-12-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 218.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mfrachet |
| Maintainers | skahrz |

## Links

- npm: https://www.npmjs.com/package/cypress-pseudo-localization
- npm.io page: https://npm.io/package/cypress-pseudo-localization

## Recent versions

- 1.0.0 (latest) — 2021-12-29

## README

A plugin that allows to transform regular strings into their [pseudo-localized](https://en.wikipedia.org/wiki/Pseudolocalization) variant. It's a wrapper around a small fork of https://github.com/tryggvigy/pseudo-localization.

We highly recommend using this plugin in addition to a [visual regression testing tool](https://docs.cypress.io/plugins/directory#Visual%20Testing).

![A pseudo localized Cypress test showing the variant](./docs/image.png)

## Installation

```sh
$ yarn add cypress-pseudo-localization

# or

$ npm i --save cypress-pseudo-localization
```

## In your code

Inside the `cypress/support/commands.js` file, add the following at the top:

```js
import "cypress-pseudo-localization";
```

And then, in your cypress tests:

```js
beforeEach(() => {
  cy.visit("https://your-page-some-where.com/");
  cy.pseudoLocalize();
});

// Make sure to cleanup to localization after the tests
// Needed, because there's a mutation observer used under the hood
afterEach(cy.stopPseudoLocalize);
```

---
_Source: https://npm.io/package/cypress-pseudo-localization · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
