Skip to content

chore(dep): update jest to v30.0.5 #2880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
"@graphql-tools/merge": "9.1.1",
"@graphql-tools/schema": "10.0.25",
"@theguild/prettier-config": "3.0.1",
"@types/jest": "29.5.14",
"@types/jest": "30.0.0",
"@types/mongodb": "4.0.7",
"@types/node": "22.17.0",
"@types/node": "24.2.0",
"@typescript-eslint/eslint-plugin": "8.38.0",
"@typescript-eslint/parser": "8.38.0",
"bob-the-bundler": "7.0.1",
Expand All @@ -78,14 +78,14 @@
"eslint-plugin-standard": "5.0.0",
"graphql": "16.11.0",
"husky": "9.1.7",
"jest": "29.7.0",
"jest": "30.0.5",
"json-bigint-patch": "0.0.8",
"lint-staged": "16.1.2",
"mockdate": "3.0.5",
"mongodb": "6.18.0",
"prettier": "3.6.2",
"semver": "7.7.2",
"ts-jest": "29.4.0",
"ts-jest": "29.4.1",
"typescript": "5.9.2"
},
"publishConfig": {
Expand Down
9 changes: 2 additions & 7 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>the-guild-org/shared-config:renovate"
],
"extends": ["github>the-guild-org/shared-config:renovate"],
"automerge": false,
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"patch"
],
"matchUpdateTypes": ["minor", "patch"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchPackageNames": [
Expand Down
41 changes: 25 additions & 16 deletions tests/PhoneNumber.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Kind } from 'graphql/language';
import { GraphQLPhoneNumber } from '../src/scalars/PhoneNumber.js';

function PhoneNumberError(value: string) {
return `Invalid phone number: ${value}. Please ensure it's in a valid format. The country code is optional, and Spaces and dashes are allowed. Examples: +1 (123) 456-7890, +44 (20) 2121 2222, or 123 456-7890.`
return `Invalid phone number: ${value}. Please ensure it's in a valid format. The country code is optional, and Spaces and dashes are allowed. Examples: +1 (123) 456-7890, +44 (20) 2121 2222, or 123 456-7890.`;
}

describe('PhoneNumber', () => {
Expand All @@ -26,11 +26,11 @@ describe('PhoneNumber', () => {
});
describe('without country code', () => {
test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('7895551234')).not.toThrow()
expect(() => GraphQLPhoneNumber.serialize('7895551234')).not.toThrow();
});

test('parseValue', () => {
expect(() => GraphQLPhoneNumber.parseValue('123 456-7890')).not.toThrow()
expect(() => GraphQLPhoneNumber.parseValue('123 456-7890')).not.toThrow();
});

test('parseLiteral', () => {
Expand All @@ -41,15 +41,15 @@ describe('PhoneNumber', () => {
});
describe('different formatting', () => {
test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('62-(21)-9175-5194')).not.toThrow()
expect(() => GraphQLPhoneNumber.serialize('62-(21)-9175-5194')).not.toThrow();
});

test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('+622191755194')).not.toThrow()
expect(() => GraphQLPhoneNumber.serialize('+622191755194')).not.toThrow();
});

test('parseValue', () => {
expect(() => GraphQLPhoneNumber.parseValue('+62 (21) 9175 5194')).not.toThrow()
expect(() => GraphQLPhoneNumber.parseValue('+62 (21) 9175 5194')).not.toThrow();
});

test('parseLiteral', () => {
Expand All @@ -63,19 +63,20 @@ describe('PhoneNumber', () => {
describe('invalid case', () => {
describe('contains Non-Numeric Characters', () => {
test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('98aaa333')).toThrow(PhoneNumberError('98aaa333'));
expect(() => GraphQLPhoneNumber.serialize('98aaa333')).toThrow(
PhoneNumberError('98aaa333'),
);
});

test('parseValue', () => {
expect(() => GraphQLPhoneNumber.parseValue('98aaa333ppp')).toThrow(PhoneNumberError('98aaa333ppp'));
expect(() => GraphQLPhoneNumber.parseValue('98aaa333ppp')).toThrow(
PhoneNumberError('98aaa333ppp'),
);
});

test('parseLiteral', () => {
expect(() =>
GraphQLPhoneNumber.parseLiteral(
{ value: '98aa', kind: Kind.STRING },
{},
),
GraphQLPhoneNumber.parseLiteral({ value: '98aa', kind: Kind.STRING }, {}),
).toThrow(PhoneNumberError('98aa'));
});
});
Expand All @@ -98,19 +99,27 @@ describe('PhoneNumber', () => {

describe('wrong formate', () => {
test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('+17 89- 5')).toThrow(PhoneNumberError('+17 89- 5'));
expect(() => GraphQLPhoneNumber.serialize('+17 89- 5')).toThrow(
PhoneNumberError('+17 89- 5'),
);
});

test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('+1 ( 123 ) 456-7890')).toThrow(PhoneNumberError('+1 ( 123 ) 456-7890'));
expect(() => GraphQLPhoneNumber.serialize('+1 ( 123 ) 456-7890')).toThrow(
PhoneNumberError('+1 ( 123 ) 456-7890'),
);
});

test('serialize', () => {
expect(() => GraphQLPhoneNumber.serialize('+1[123]456 7890')).toThrow(PhoneNumberError('+1[123]456 7890'));
expect(() => GraphQLPhoneNumber.serialize('+1[123]456 7890')).toThrow(
PhoneNumberError('+1[123]456 7890'),
);
});

test('parseValue', () => {
expect(() => GraphQLPhoneNumber.parseValue('+(178)95 55 5678')).toThrow(PhoneNumberError('+(178)95 55 5678'));
expect(() => GraphQLPhoneNumber.parseValue('+(178)95 55 5678')).toThrow(
PhoneNumberError('+(178)95 55 5678'),
);
});

test('parseLiteral', () => {
Expand Down
14 changes: 7 additions & 7 deletions tests/iso-date/Duration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ describe('GraphQLISO8601Duration', () => {
describe('serialization', () => {
it('throws an error when a non string is passed', () => {
NON_STRING_VALUES.forEach(value => {
expect(() => GraphQLISO8601Duration.serialize(value)).toThrowError(
expect(() => GraphQLISO8601Duration.serialize(value)).toThrow(
`Value is not string: ${value}`,
);
});
});

it('throws an error for all the invalid values', () => {
INVALID_VALUES.forEach(value => {
expect(() => GraphQLISO8601Duration.serialize(value)).toThrowError(
expect(() => GraphQLISO8601Duration.serialize(value)).toThrow(
`Value is not a valid ISO Duration: ${value}`,
);
});
Expand All @@ -168,15 +168,15 @@ describe('GraphQLISO8601Duration', () => {
describe('parseValue', () => {
it('throws an error when a non string is passed', () => {
NON_STRING_VALUES.forEach(value => {
expect(() => GraphQLISO8601Duration.parseValue(value)).toThrowError(
expect(() => GraphQLISO8601Duration.parseValue(value)).toThrow(
`Value is not string: ${value}`,
);
});
});

it('throws an error for all the invalid values', () => {
INVALID_VALUES.forEach(value => {
expect(() => GraphQLISO8601Duration.parseValue(value)).toThrowError(
expect(() => GraphQLISO8601Duration.parseValue(value)).toThrow(
`Value is not a valid ISO Duration: ${value}`,
);
});
Expand All @@ -198,9 +198,9 @@ describe('GraphQLISO8601Duration', () => {

it('throws an error for all the invalid values', () => {
INVALID_VALUES.forEach(value => {
expect(() =>
GraphQLISO8601Duration.parseLiteral({ value, kind: Kind.STRING }, {}),
).toThrowError(`Value is not a valid ISO Duration: ${value}`);
expect(() => GraphQLISO8601Duration.parseLiteral({ value, kind: Kind.STRING }, {})).toThrow(
`Value is not a valid ISO Duration: ${value}`,
);
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/iso-date/Time.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('GraphQLTime', () => {
].forEach(literal => {
it(`errors when parsing invalid literal ${stringify(literal)}`, () => {
// @ts-expect-error - intentional invalid input
expect(() => GraphQLTime.parseLiteral(literal, {})).toThrowError();
expect(() => GraphQLTime.parseLiteral(literal, {})).toThrow();
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"@types/react": "19.1.9",
"cross-env": "10.0.0",
"next-sitemap": "4.2.3",
"pagefind": "1.3.0",
"postcss-import": "16.1.1",
"postcss-lightningcss": "1.0.1",
"pagefind": "1.3.0",
"tailwindcss": "3.4.17",
"typescript": "5.9.2"
},
Expand Down
2 changes: 1 addition & 1 deletion website/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@theguild/tailwind-config/postcss.config';
export { default } from '@theguild/tailwind-config/postcss.config';
16 changes: 8 additions & 8 deletions website/src/content/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ You can also import ready-to-use type definitions for scalars like below:

```ts
// or import specific typeDefs only with ES6 Import
import { ScalarNameTypeDefinition } from 'graphql-scalars';
import { ScalarNameTypeDefinition } from 'graphql-scalars'
// or import specific typeDefs only with CommonJS
const { ScalarNameTypeDefinition } = require('graphql-scalars');
const { ScalarNameTypeDefinition } = require('graphql-scalars')
// or import all typeDefs once with ES6 Import
import { typeDefs as scalarTypeDefs } from 'graphql-scalars';
import { typeDefs as scalarTypeDefs } from 'graphql-scalars'
// or import all typeDefs once with CommonJS
const { typeDefs: scalarTypeDefs } = require('graphql-scalars');
const { typeDefs: scalarTypeDefs } = require('graphql-scalars')

const typeDefs = [
...scalarTypeDefs,
...scalarTypeDefs
// other typeDefs
];
]
// or
const typeDefs = [
ScalarNameTypeDefinition,
ScalarNameTypeDefinition
// other typeDefs
];
]
```

### Importing it into your Resolver Map
Expand Down
4 changes: 2 additions & 2 deletions website/src/content/scalars/timestamp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Callout } from '@theguild/components'

# Timestamp

The JavaScript `Date` as integer. Type represents date and time as number of milliseconds from
start of the UNIX epoch.
The JavaScript `Date` as integer. Type represents date and time as number of milliseconds from start
of the UNIX epoch.

<Callout>
Taken from
Expand Down
Loading