Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(yor-NIG): Yoruba language translation #20

Open
wants to merge 5 commits into
base: docs/vuepress
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions packages/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module.exports = {
"/zh-Hant/": {
message: "新內容可用。",
buttonText: "刷新"
},
"/yor/": {
message: "",
buttonText: ""
}
}
},
Expand Down Expand Up @@ -90,6 +94,39 @@ module.exports = {
children: []
}
]
},
"/yor/": {
selectText: "",
label: "",
editLinkText: "",
sidebar: [
"/yor/",
{
title: "@onyx/matchers",
path: "/yor/matchers/",
children: [
"/yor/matchers/matchers/to-be",
"/yor/matchers/matchers/to-be-defined",
"/yor/matchers/matchers/to-be-false",
"/yor/matchers/matchers/to-be-instance-of",
"/yor/matchers/matchers/to-be-nan",
"/yor/matchers/matchers/to-be-null",
"/yor/matchers/matchers/to-be-true",
"/yor/matchers/matchers/to-be-type-of",
"/yor/matchers/matchers/to-be-undefined",
"/yor/matchers/matchers/to-contain",
"/yor/matchers/matchers/to-equal",
"/yor/matchers/matchers/to-have-length",
"/yor/matchers/matchers/to-strictly-equal",
"/yor/matchers/matchers/to-throw"
]
},
{
title: "@onyx/mock",
path: "/yor/mock/",
children: []
}
]
}
}
},
Expand All @@ -108,6 +145,11 @@ module.exports = {
lang: "zh-TW",
title: "Onyx",
description: "Onyx是一個JavaScript測試框架。"
},
"/yor/": {
lang: "yor-NIG",
title: "Onyx",
description: ""
}
}
};
9 changes: 9 additions & 0 deletions packages/docs/yor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Onyx
![Onyx logo](/onyx/onyx-logo-sm.svg)

[![kiko ipo](https://travis-ci.org/onyxjs/onyx.svg?branch=master)](https://travis-ci.org/onyxjs/onyx)
[![codecov](https://codecov.io/gh/onyxjs/onyx/branch/master/graph/badge.svg)](https://codecov.io/gh/onyxjs/onyx)

> Onyx je ibi awoose fun JavaScript

Translated by Ibrahim Olanrewaju Abdulkareem, [email protected]
4 changes: 4 additions & 0 deletions packages/docs/yor/matchers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @onyx/matchers
![Onyx logo](/onyx/onyx-logo-sm.svg)

apo yi le shey matcher ti yo shey afiwe otun le shey afowosi otun le so iyato ni arin orisirisi tests wa.
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/expect/expect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## expect

> ibuwolu: `expect ( matchers: { [ key: string ]: Function }, expectation: any): any`

`expect` ofi aye sile lati fi shey igbeyewo iwulo lori awon iye ko kan ki o ba le pade awon ireti to daaju . ise `expect` le so owo po pelu `matcher` lati shey afowosi iye ireti to daju ti o si wu wa.

### Apeere

```ts
import { expect } from '@onyx/matchers';

console.log(expect(1).toBeTypeOf('number')); // true
console.log(expect('string').toHaveLength(6)); // true
console.log(expect(2).not.toBeTypeOf('number')); // false
console.log(expect('string').not.toHaveLength(6)); // false
```
18 changes: 18 additions & 0 deletions packages/docs/yor/matchers/matchers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Matcher functions
Gbogbo ise matcher ni owa ni ibibi:
- [toBe](to-be)
- [toBeDefined](to-be-defined)
- [toBeFalse](to-be-false)
- [toBeFalsy](to-be-falsy)
- [toBeInstanceOf](to-be-instance-of)
- [toBeNaN](to-be-nan)
- [toBeNull](to-be-null)
- [toBeTrue](to-be-true)
- [toBeTruthy](to-be-truthy)
- [toBeTypeOf](to-be-type-of)
- [toBeUndefined](to-be-undefined)
- [toContain](to-contain)
- [toEqual](to-equal)
- [toHaveLength](to-have-length)
- [toStrictlyEqual](to-strictly-equal)
- [toThrow](to-throw)
17 changes: 17 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-defined.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## toBeDefined

> Ibuwolu: `toBeDefined (a: any): boolean`

`toBeDefined` shey ayewo iye ti o ti wa tele. yo da rara nikan pada `false` ti ko ba ti si iye na tele `undefined` fun igbewole wa

### Apeere

```ts
import { toBeDefined } from '@onyx/matchers';

console.log(toBeDefined(1)); // true
console.log(toBeDefined({}); // true
console.log(toBeDefined(NaN)); // true
console.log(toBeDefined(null)); // true
console.log(toBeDefined(undefined)); // false
```
18 changes: 18 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-false.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## toBeFalse (toBeFalsy)

> Ibuwolu: `toBeFalse (a: any): boolean`

`toBeFalse` matcher (ole tun je `toBeFalsy`) se ayewo boya iye ti a fun o kin shey iro.

### Apeere

```ts
import { toBeFalse } from '@onyx/matchers';

console.log(toBeFalse(false)); // true
console.log(toBeFalse(undefined)); // true
console.log(toBeFalse(NaN)); // true
console.log(toBeFalse(0)); // true
console.log(toBeFalse(1)); // false
console.log(toBeFalse({})); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-instance-of.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toBeInstanceOf

> Ibuwolu: `toBeInstanceOf (a: any, b: Function): boolean`

`toBeInstanceOf` matcher shey ayewo boya iru igbewole arguementi akoko ni iru igbewole arguementi elekeji.

### Apeere

```ts
import { toBeInstanceOf } from '@onyx/matchers';

console.log(toBeInstanceOf(document, Document)); // true
console.log(toBeInstanceOf(document.body, Element)); // true
console.log(toBeInstanceOf([], Array)); // true
console.log(toBeInstanceOf({}, Element)); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-nan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toBeNaN

> Ibuwolu: `toBeNaN (a: any, b: any): boolean`

`toBeNaN` matcher ma Shey ayewo boya iye ti a fun je `NaN`. Ti iye na ba je string to, `toBeNaN` ma parse e.

### Apeere

```ts
import { toBeNaN } from '@onyx/matchers';

console.log(toBeNaN(NaN)); // true
console.log(toBeNaN('onyx')); // true
console.log(toBeNaN(1)); // false
console.log(toBeNaN(1337)); // false
```
14 changes: 14 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-null.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## toBeNull

> Ibuwolu: `toBeNull (a: any): boolean`

`toBeNull` matcher shey ayewo iye ti a fun boya o je `null`.

### Apeere

```ts
import { toBeNull } from '@onyx/matchers';

console.log(toBeNull(null)); // true
console.log(toBeNull(1)); // false
```
18 changes: 18 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-true.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## toBeTrue (toBeTruthy)

> Ibuwolu: `toBeTrue (a: any): boolean`

`toBeTrue` matcher (abi ki a pe ni `toBeTruthy`) shey ayewo boya iye ti a fun je ooto

### Apeere

```ts
import { toBeTrue } from '@onyx/matchers';

console.log(toBeTrue(false)); // false
console.log(toBeTrue(undefined)); // false
console.log(toBeTrue(NaN)); // false
console.log(toBeTrue(0)); // false
console.log(toBeTrue(1)); // true
console.log(toBeTrue({})); // true
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-type-of.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toBeTypeOf

> Ibuwolu: `toBeTypeOf (a: any, b: Function): boolean`

`toBeTypeOf` matcher shey ayewo fun iru igbewole arguementi akoko.

### Apeere

```ts
import { toBeTypeOf } from '@onyx/matchers';

console.log(toBeTypeOf('', 'string')); // true
console.log(toBeTypeOf(22, 'number')); // true
console.log(toBeTypeOf([], 'array')); // true
console.log(toBeTypeOf({}, 'boolean')); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be-undefined.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toBeUndefined

> Ibuwolu: `toBeUndefined (a: any): boolean`

`toBeUndefined` matcher shey ayewo fun arguementi igbewole boya ko si tele.

### Apeere

```ts
import { toBeUndefined } from '@onyx/matchers';

console.log(toBeUndefined('')); // false
console.log(toBeUndefined(undefined)); // true
console.log(toBeUndefined(null)); // false
console.log(toBeUndefined({})); // false
```
18 changes: 18 additions & 0 deletions packages/docs/yor/matchers/matchers/to-be.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## toBe

> Ibuwolu: `toBe (a: any, b: any): boolean`

`toBe` matcher shey afilo `lodash.isEqual` ati `Object.is` labe nkan afibo lati fi shey afiwe awon iye. ode ma da ooto pada `true` ti awon iye yen ba jo arawon, `false` o si ma da rara pada ti awon iye yen ko ba jo arawon.

### Apeere

```ts
import { toBe } from '@onyx/matchers';

console.log(toBe(1, 1)); // true
console.log(toBe({}, {})); // true
console.log(toBe(NaN, NaN)); // true
console.log(toBe(1, 2)); // false
console.log(toBe(NaN, null)); // false
console.log(toBe(undefined, null)); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-contain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toContain

> ibuwolu: `toContain (a: any[] | object, b: any): boolean`

`toContain` matcher shey ayewo parameta ti akooko ni boya o wa ni inu parameta elekeji.

### Apeere

```ts
import { toContain } from '@onyx/matchers';

console.log(toContain([1], 1)); // true
console.log(toContain({a: 'b'}, 'b')); // true
console.log(toContain([{}, 1, 'onyx'], 'onyx')); // true
console.log(toContain(1 as any, 'onyx')); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-equal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toEqual

> Ibuwolu: `toEqual (a: any, b: any): boolean`

`toEqual` matcher ma se `type coercion` ode tun ma shey ayewo parameta ti a fun ki oba le wo bi oshey da si.

### Apeere

```ts
import { toEqual } from '@onyx/matchers';

console.log(toEqual(1, '1')); // true
console.log(toEqual('string', ['string'])); // true
console.log(toEqual('five', 5)); // false
console.log(toEqual({}, {})); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-have-length.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toHaveLength

> Ibuwolu: `toHaveLength (a: any, b: number): boolean`

`toHaveLength` matcher ma shey ayewo boya objecti ni properti length ode tun ma wo boya o se deede pelu iye o miran.

### Apeere

```ts
import { toHaveLength } from '@onyx/matchers';

console.log(toHaveLength({}, 0)); // true
console.log(toHaveLength('string', 6)); // true
console.log(toHaveLength(undefined, 1)); // false
console.log(toHaveLength(null, 1)); // false
```
16 changes: 16 additions & 0 deletions packages/docs/yor/matchers/matchers/to-strictly-equal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## toStrictlyEqual

> Ibuwolu: `toStrictlyEqual (a: any, b: any): boolean`

`toStrictlyEqual` matcher ma shey ayewo boya iye ti a fun yen shey deede pelu ara won ati boya iye yen je iru ikan na `value` and `type`.

### Apeere

```ts
import { toStrictlyEqual } from '@onyx/matchers';

console.log(toStrictlyEqual(0, 0)); // true
console.log(toStrictlyEqual('onyx', 'onyx')); // true
console.log(toStrictlyEqual(0, -1)); // false
console.log(toStrictlyEqual(0, '0')); // false
```
18 changes: 18 additions & 0 deletions packages/docs/yor/matchers/matchers/to-throw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## toThrow

> Ibuwolu: `toThrow (a: Function, b: string | Function): boolean`

`toThrow` matcher shey ayewo ise boya o ma so nkan jade ti a ba pe.

### Apeere

```ts
import { toThrow } from '@onyx/matchers';

const throwingFn = () => { throw new Error('error') };

console.log(toThrow(throwingFn, 'error')); // true
console.log(toThrow(() => throwingFn(), 'error')); // true
console.log(toThrow(() => { throw new Error('test1'); }, 'test')); // true
console.log(toThrow(() => undefined, 'test')); // false
```
4 changes: 4 additions & 0 deletions packages/docs/yor/mock/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @onyx/mock
![Onyx logo](/onyx/onyx-logo-sm.svg)

apo yi le fun wa ni ise ti ole je ise ti a le mocki, ti a le ji wo, ati objecti ti a le wo nkan ti o le shey, o le shey ayewo boya ati pe ise kan jade, ole shey ayewo nkan ti a pe pelu re , osi le je ki a mo nkan ti o fun wa pada.
16 changes: 16 additions & 0 deletions packages/docs/yor/mock/mock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## mock

> Ibuwolu: `mock (fn: Function, cb?: (args: any[], result: any) => any): mock`

`mock` eleyi ma fi aye sile lati fi se atunse osi ma je ki a wo iwa objecti alaye wa ati metodi ninu unit testi wa.

### Apeere

```ts
import { mock } from '@onyx/mock';

const fn = (a: number, b: number) => a + b;
const mockFn = mock(fn);

console.log(mockFn(5, 5)); // 10
```