Commit 4e3da78
fix(hub): test list datasets (#1567)
Hello there 👋
It's my first time contributing. I tried to set up the project with
`pnpm` and got error when running the tests:
```bash
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
│ FAIL src/lib/list-datasets.spec.ts > listDatasets > should list datasets from hf-doc-builder
│ AssertionError: expected [ { …(7) }, { …(7) } ] to deeply equal [ { …(7) }, { …(7) } ]
│ - Expected
│ + Received
│ Array [
│ Object {
│ "downloads": 0,
│ "gated": false,
│ - "id": "6356b19985da6f13863228bd",
│ + "id": "636a1b69f2f9ec4289c4c19e",
│ "likes": 0,
│ - "name": "hf-doc-build/doc-build",
│ + "name": "hf-doc-build/doc-build-dev",
│ "private": false,
│ "updatedAt": 1970-01-01T00:00:00.000Z,
│ },
│ Object {
│ "downloads": 0,
│ "gated": false,
│ - "id": "636a1b69f2f9ec4289c4c19e",
│ + "id": "6356b19985da6f13863228bd",
│ "likes": 0,
│ - "name": "hf-doc-build/doc-build-dev",
│ + "name": "hf-doc-build/doc-build",
│ "private": false,
│ "updatedAt": 1970-01-01T00:00:00.000Z,
│ },
│ ]
│ ❯ src/lib/list-datasets.spec.ts:26:24
│ 24| }
│ 25|
│ 26| expect(results).deep.equal([
│ | ^
│ 27| {
│ 28| id: "6356b19985da6f13863228bd",
│ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
│ Test Files 1 failed | 39 passed (40)
│ Tests 1 failed | 135 passed (136)
│ Start at 02:32:04
│ Duration 14.37s (transform 650ms, setup 3ms, collect 2.44s, tests 65.94s, environment 3ms, prepare 2.74s)
```
So I fix it.
---------
Co-authored-by: Eliott C. <[email protected]>1 parent 13becc9 commit 4e3da78
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments