Skip to content

Commit 85a9b25

Browse files
committed
test: add another types badge e2e test
1 parent ff2c385 commit 85a9b25

File tree

3 files changed

+110
-0
lines changed

3 files changed

+110
-0
lines changed

test/e2e/badge.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ test.describe('badge API', () => {
106106
const { body } = await fetchBadge(page, url)
107107

108108
expect(body).toContain('@types')
109+
expect(body).not.toContain('missing')
110+
})
111+
112+
test('types badge shows included badge when types not declared explictly', async ({
113+
page,
114+
baseURL,
115+
}) => {
116+
const url = toLocalUrl(baseURL, '/api/registry/badge/types/nano-stringify-object')
117+
const { body } = await fetchBadge(page, url)
118+
119+
expect(body).toContain('included')
120+
expect(body).not.toContain('missing')
109121
})
110122
})
111123

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files": [,
3+
{ "name": "dist/index.d.ts", "hash": "ghi", "size": 1200 },
4+
{ "name": "dist/index.js", "hash": "def", "size": 5700 },
5+
{ "name": "package.json", "hash": "abc", "size": 600 }
6+
]
7+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"_id": "nano-stringify-object",
3+
"name": "nano-stringify-object",
4+
"dist-tags": {
5+
"latest": "0.0.0"
6+
},
7+
"versions": {
8+
"0.0.0": {
9+
"name": "nano-stringify-object",
10+
"version": "0.0.0",
11+
"license": "MIT",
12+
"author": "gameroman",
13+
"repository": {
14+
"type": "git",
15+
"url": "git+https://github.com/gameroman-npm/nano-stringify-object.git"
16+
},
17+
"type": "module",
18+
"exports": {
19+
".": "./dist/index.mjs",
20+
"./package.json": "./package.json"
21+
},
22+
"scripts": {
23+
"format": "oxfmt",
24+
"lint": "oxlint",
25+
"test": "bun test",
26+
"build": "tsdown",
27+
"prepublishOnly": "bun run build"
28+
},
29+
"devDependencies": {
30+
"oxfmt": "^0.38.0",
31+
"oxlint": "^1.50.0",
32+
"tsdown": "^0.21.2",
33+
"typescript": "^5.9.3"
34+
},
35+
"_id": "nano-stringify-object@0.0.0",
36+
"_integrity": "sha512-s4XcjhMpc1u7HfHHimUAT0dtNNYFiOunlNPGUv5N9BoX4X1Lwklq4ckdFDPo+50/exciNsf0ggH4s8Sj6CufOA==",
37+
"_nodeVersion": "24.3.0",
38+
"_npmVersion": "10.8.3",
39+
"shasum": "dbb692872dc94d6fd0adc93b66c8e09c67f78260",
40+
"dist": {
41+
"integrity": "sha512-s4XcjhMpc1u7HfHHimUAT0dtNNYFiOunlNPGUv5N9BoX4X1Lwklq4ckdFDPo+50/exciNsf0ggH4s8Sj6CufOA==",
42+
"shasum": "dbb692872dc94d6fd0adc93b66c8e09c67f78260",
43+
"tarball": "https://registry.npmjs.org/nano-stringify-object/-/nano-stringify-object-0.0.0.tgz",
44+
"fileCount": 5,
45+
"unpackedSize": 8783,
46+
"signatures": [
47+
{
48+
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
49+
"sig": "MEQCIF396neosjaDQP6JgESc3D/CpgE5VZik5CqXY/F68gUnAiAmtw8VnyNnYMNisW4K0S75AJicujUpd0u8g4kQ35t0YA=="
50+
}
51+
]
52+
},
53+
"_npmUser": {
54+
"name": "gameroman",
55+
"email": "dev@rman.dev"
56+
},
57+
"directories": {},
58+
"maintainers": [
59+
{
60+
"name": "gameroman",
61+
"email": "dev@rman.dev"
62+
}
63+
],
64+
"_npmOperationalInternal": {
65+
"host": "s3://npm-registry-packages-npm-production",
66+
"tmp": "tmp/nano-stringify-object_0.0.0_1773271904176_0.4735360871124257"
67+
},
68+
"_hasShrinkwrap": false
69+
}
70+
},
71+
"time": {
72+
"created": "2026-03-11T23:31:44.175Z",
73+
"0.0.0": "2026-03-11T23:31:44.334Z",
74+
"modified": "2026-03-11T23:31:44.554Z"
75+
},
76+
"maintainers": [
77+
{
78+
"name": "gameroman",
79+
"email": "dev@rman.dev"
80+
}
81+
],
82+
"repository": {
83+
"type": "git",
84+
"url": "git+https://github.com/gameroman-npm/nano-stringify-object.git"
85+
},
86+
"author": "gameroman",
87+
"license": "MIT",
88+
"readme": "",
89+
"readmeFilename": "",
90+
"_rev": "1-d7e9fda2cb18e6ea7d359fdc679eea56"
91+
}

0 commit comments

Comments
 (0)