mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
chore: fast-json-format library upgrade
This commit is contained in:
8
package-lock.json
generated
8
package-lock.json
generated
@@ -14235,9 +14235,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/fast-json-format": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-format/-/fast-json-format-0.2.0.tgz",
|
||||
"integrity": "sha512-HdcxHsca6fqk7vt7Ak4a8JTWZQt3yEPwXk8hBPKCg8PLgX7DmXEbwgv7vLLiinAQxTcSFNyz5OiWr8m4r/0tKA==",
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-format/-/fast-json-format-0.3.0.tgz",
|
||||
"integrity": "sha512-B95psGYXJ5XItmxLR6JFcQRQafDyfy8ecHiV/jWCJF9oCIA9/o+wt89cGW61D04xf07yCpIaevvCQbgeJ9w8lQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
@@ -26874,7 +26874,7 @@
|
||||
"dompurify": "^3.2.4",
|
||||
"escape-html": "^1.0.3",
|
||||
"fast-fuzzy": "^1.12.0",
|
||||
"fast-json-format": "~0.2.0",
|
||||
"fast-json-format": "~0.3.0",
|
||||
"file": "^0.2.2",
|
||||
"file-dialog": "^0.0.8",
|
||||
"file-saver": "^2.0.5",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"dompurify": "^3.2.4",
|
||||
"escape-html": "^1.0.3",
|
||||
"fast-fuzzy": "^1.12.0",
|
||||
"fast-json-format": "~0.2.0",
|
||||
"fast-json-format": "~0.3.0",
|
||||
"file": "^0.2.2",
|
||||
"file-dialog": "^0.0.8",
|
||||
"file-saver": "^2.0.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "bigint-test",
|
||||
"name": "collection",
|
||||
"type": "collection",
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
@@ -1,5 +1,5 @@
|
||||
meta {
|
||||
name: bigint-request
|
||||
name: request
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
@@ -12,6 +12,7 @@ post {
|
||||
|
||||
body:json {
|
||||
{
|
||||
"data": 1736184243098437392
|
||||
"bigint": 1736184243098437392,
|
||||
"unicode": ["\u4e00","\u4e8c","\u4e09"]
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"collections": [
|
||||
{
|
||||
"path": "{{projectRoot}}/tests/response/json-with-bigint-response-formatting/fixtures/collection",
|
||||
"path": "{{projectRoot}}/tests/response/json-response-formatting/fixtures/collection",
|
||||
"securityConfig": {
|
||||
"jsSandboxMode": "safe"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"maximized": false,
|
||||
"lastOpenedCollections": [
|
||||
"{{projectRoot}}/tests/response/json-response-formatting/fixtures/collection"
|
||||
]
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
import { test, expect } from '../../../playwright';
|
||||
import { closeAllCollections } from '../../utils/page';
|
||||
|
||||
test.describe.serial('JSON Response Formatting with BigInt', () => {
|
||||
test.describe.serial('JSON Response Formatting', () => {
|
||||
test.afterAll(async ({ pageWithUserData: page }) => {
|
||||
// cleanup: close all collections
|
||||
await closeAllCollections(page);
|
||||
});
|
||||
|
||||
test('should handle BigInt values in JSON response formatting', async ({ pageWithUserData: page }) => {
|
||||
test('should handle BigInt values and unicode chars in JSON response formatting', async ({ pageWithUserData: page }) => {
|
||||
await test.step('Navigate to collection and request', async () => {
|
||||
// Navigate to the test collection
|
||||
await expect(page.locator('#sidebar-collection-name').getByText('bigint-test')).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').getByText('bigint-test').click();
|
||||
await expect(page.locator('#sidebar-collection-name').getByText('collection')).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').getByText('collection').click();
|
||||
|
||||
// Navigate to the bigint request
|
||||
await page.getByRole('complementary').getByText('bigint-request').click();
|
||||
// Navigate to the request
|
||||
await page.getByRole('complementary').getByText('request').click();
|
||||
});
|
||||
|
||||
await test.step('Send request and verify response', async () => {
|
||||
@@ -28,8 +28,13 @@ test.describe.serial('JSON Response Formatting with BigInt', () => {
|
||||
const responseBody = page.locator('.response-pane');
|
||||
await expect(responseBody).toBeVisible();
|
||||
|
||||
// The response should echo back our request data
|
||||
await expect(responseBody).toContainText('"data": 1736184243098437392');
|
||||
// The response should preserve `bigint` value precision
|
||||
await expect(responseBody).toContainText('1736184243098437392');
|
||||
|
||||
// The response should handle unicode chars
|
||||
await expect(responseBody).toContainText('一');
|
||||
await expect(responseBody).toContainText('二');
|
||||
await expect(responseBody).toContainText('三');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"maximized": false,
|
||||
"lastOpenedCollections": [
|
||||
"{{projectRoot}}/tests/response/json-with-bigint-response-formatting/fixtures/collection"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user