Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
fix: axios response parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ErrorErrorError committed Dec 16, 2023
1 parent 4946e8a commit 2747221
Show file tree
Hide file tree
Showing 10 changed files with 1,649 additions and 379 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"ecmaVersion": 18,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
Expand All @@ -17,4 +15,4 @@
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"]
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
release:
types: [published]

env:
env:
HUSKY: 0
TAG_NAME: ${{ github.event.release.tag_name }}

Expand Down Expand Up @@ -36,6 +36,6 @@ jobs:
run: pnpm build

- run: pnpm publish --provenance --access public --no-git-checks
env:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_MOCHI_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_MOCHI_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_MOCHI_TOKEN}}
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: lint

on:
on:
push:
branches:
- '*'
pull_request:
types: [review_requested]

env:
env:
HUSKY: 0

jobs:
Expand All @@ -22,5 +22,5 @@ jobs:
- run: corepack enable
- run: corepack prepare pnpm@latest --activate
- run: pnpm install --frozen-lockfile
- run: pnpm lint -f github-annotations
continue-on-error: true
- run: pnpm lint -f github-annotations
continue-on-error: true
16 changes: 8 additions & 8 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"tabWidth": 2,
"useTabs": false,
"printWidth": 80,
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"endOfLine": "lf"
}
"tabWidth": 2,
"useTabs": false,
"printWidth": 80,
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"endOfLine": "lf"
}
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
![Supported Version](https://img.shields.io/github/package-json/dependency-version/Mochi-Team/runner/dev/%40mochiapp/js/main)

# @mochiapp/runner

> A test runner used for Mochi modules.
## Installation

Using pnpm:

```bash
pnpm add -D @mochiapp/runner
```

Using npm:

```bash
npm install --save-dev @mochiapp/runner
```

Using yarn:

```bash
yarn add -D @mochiapp/runner
```

## Example

In a test file:

```js
import Source from '../src/source';
import runner from '@mochiapp/runner';

const source = runner(Source);

test('fetch filters', () => {
return source.searchFilters()
.then(r => {
assert.equal(r.length, 1);
});
return source.searchFilters().then((r) => {
assert.equal(r.length, 1);
});
});

// Rest of the tests...
```

13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@
},
"devDependencies": {
"@mochiapp/js": "~0.0.1",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"chai": "^4.3.10",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"mocha": "^10.2.0",
"prettier": "^3.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"peerDependencies": {
Expand All @@ -43,8 +49,9 @@
"prepare": "husky install",
"lint": "eslint",
"lint:fix": "eslint --fix",
"format": "prettier -w src",
"format:check": "prettier --check src",
"build": "rm -rf dist/ && tsc"
"format": "prettier -w .",
"format:check": "prettier --check .",
"build": "rm -rf dist/ && tsc",
"test": "mocha -r ts-node/register test/**/*.spec.ts"
}
}
Loading

0 comments on commit 2747221

Please sign in to comment.