chore: fast-json-format library upgrade

This commit is contained in:
lohit-bruno
2025-11-10 16:58:14 +05:30
parent ab7ead91d5
commit 408dd6bccf
8 changed files with 29 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
{
"version": "1",
"name": "bigint-test",
"name": "collection",
"type": "collection",
"ignore": [
"node_modules",

View File

@@ -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"]
}
}

View File

@@ -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"
}

View File

@@ -0,0 +1,6 @@
{
"maximized": false,
"lastOpenedCollections": [
"{{projectRoot}}/tests/response/json-response-formatting/fixtures/collection"
]
}

View File

@@ -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('三');
});
});
});

View File

@@ -1,6 +0,0 @@
{
"maximized": false,
"lastOpenedCollections": [
"{{projectRoot}}/tests/response/json-with-bigint-response-formatting/fixtures/collection"
]
}