mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
chore: fast-json-format library upgrade
This commit is contained in:
@@ -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