chore: fix typos (#2574)

Co-authored-by: Artem Zakharchenko <[email protected]>
This commit is contained in:
Noritaka Kobayashi
2025-08-30 22:33:51 +02:00
committed by GitHub
co-authored by Artem Zakharchenko
parent 35504f51bc
commit 0231570475
15 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -602,7 +602,7 @@ describe('predicate', () => {
).resolves.toBe(false)
})
it('allows anonymous GraphQL opertaions when using "all" expected operation type', async () => {
it('allows anonymous GraphQL operations when using "all" expected operation type', async () => {
const handler = new GraphQLHandler('all', new RegExp('.*'), '*', resolver)
const request = createPostGraphQLRequest({
query: `
+1 -1
View File
@@ -3,7 +3,7 @@
*/
import { toPublicUrl } from './toPublicUrl'
test('returns an absolute request URL withouth search params', () => {
test('returns an absolute request URL without search params', () => {
expect(toPublicUrl(new URL('https://test.mswjs.io/path'))).toBe(
'https://test.mswjs.io/path',
)
+1 -1
View File
@@ -62,7 +62,7 @@ it('adds multiple clients from this runtime to the list of clients', async () =>
)
await manager.addConnection(connectionTwo)
// Must add the new cilent to the list as well.
// Must add the new client to the list as well.
expect(Array.from(manager.clients.values())).toEqual([
connectionOne,
connectionTwo,
+1 -1
View File
@@ -19,7 +19,7 @@ type RequestHandlersContext = {
/**
* A handlers controller that utilizes `AsyncLocalStorage` in Node.js
* to prevent the request handlers list from being a shared state
* across mutliple tests.
* across multiple tests.
*/
class AsyncHandlersController implements HandlersController {
private rootContext: RequestHandlersContext
@@ -18,7 +18,7 @@ test('falls through all relevant request handlers until response is returned', a
expect(consoleSpy.get('log')).toContain('[get] first')
expect(consoleSpy.get('log')).toContain('[get] second')
// The third handler is listed after the one that returnes the response,
// The third handler is listed after the one that returns the response,
// so it must never execute (response is sent).
expect(consoleSpy.get('log')).not.toContain('[get] third')
})
@@ -7,6 +7,6 @@ const worker = setupWorker(
}),
)
// By default any unhandled requests are preformed as-is
// By default any unhandled requests are performed as-is
// but produce warnings.
worker.start()
+1 -1
View File
@@ -117,7 +117,7 @@ export const test = base.extend<TestFixtures>({
page.goto(compilation.previewUrl)
await Promise.all(oncePageReady)
// All examlpes await the MSW activation message by default.
// All examples await the MSW activation message by default.
// Support opting-out from this behavior for tests where activation
// is not expected (e.g. when testing activation errors).
if (!options.skipActivation) {
@@ -510,7 +510,7 @@ test('logs raw incoming server events', async ({
await waitFor(() => {
expect(consoleSpy.get('raw')!.get('startGroupCollapsed')).toEqual(
expect.arrayContaining([
// The actual (raw) message recieved from the server.
// The actual (raw) message received from the server.
// The arrow is dotted because the message's default has been prevented.
expect.stringMatching(
/^\[MSW\] \d{2}:\d{2}:\d{2}\.\d{3} %c⇣%c hello from server %c17%c color:#ef4444 color:inherit color:gray;font-weight:normal color:inherit;font-weight:inherit$/,
+1 -1
View File
@@ -267,7 +267,7 @@ test('does not copy the script to saved paths if public directory was provided',
expect(fs.existsSync(fsMock.resolve('one/mockServiceWorker.js'))).toBe(false)
expect(fs.existsSync(fsMock.resolve('two/mockServiceWorker.js'))).toBe(false)
// Must copy the worker sript only to the provided path.
// Must copy the worker script only to the provided path.
expect(fs.existsSync(fsMock.resolve('three/mockServiceWorker.js'))).toBe(true)
})
+1 -1
View File
@@ -65,7 +65,7 @@ console.log(typeof server.listen)
/**
* @todo Also test the "msw/browser" import that throws,
* saying that the "./browser" export is not defined.
* That's correct, it's exlpicitly set as "browser: null" for Node.js.
* That's correct, it's explicitly set as "browser: null" for Node.js.
*/
const runtimeStdio = await fsMock.exec('node ./runtime.mjs')
@@ -56,7 +56,7 @@ afterAll(async () => {
await httpServer.close()
})
test('inherits cookies set from a preceeding request', async () => {
test('inherits cookies set from a preceding request', async () => {
const res = await fetch(httpServer.https.url('/login'), {
method: 'POST',
}).then(() => {
+4 -4
View File
@@ -34,7 +34,7 @@ it('stops propagation for client "message" event', async () => {
service.addEventListener('connection', ({ client }) => {
client.addEventListener('message', (event) => {
// Calling `stopPropagation` will prevent this event from being
// dispatched on the `client` beloning to a different event handler.
// dispatched on the `client` belonging to a different event handler.
event.stopPropagation()
clientMessageListener(1)
})
@@ -80,7 +80,7 @@ it('stops immediate propagation for client "message" event', async () => {
service.addEventListener('connection', ({ client }) => {
client.addEventListener('message', (event) => {
// Calling `stopPropagation` will prevent this event from being
// dispatched on the `client` beloning to a different event handler.
// dispatched on the `client` belonging to a different event handler.
event.stopImmediatePropagation()
clientMessageListener(1)
})
@@ -127,7 +127,7 @@ it('stops propagation for server "open" event', async () => {
server.addEventListener('open', (event) => {
// Calling `stopPropagation` will prevent this event from being
// dispatched on the `server` beloning to a different event handler.
// dispatched on the `server` belonging to a different event handler.
event.stopPropagation()
serverOpenListener(1)
@@ -221,7 +221,7 @@ it('stops propagation for server "message" event', async () => {
server.addEventListener('message', (event) => {
// Calling `stopPropagation` will prevent this event from being
// dispatched on the `server` beloning to a different event handler.
// dispatched on the `server` belonging to a different event handler.
event.stopPropagation()
serverMessageListener(1)
+2 -2
View File
@@ -193,7 +193,7 @@ it("graphql variables cannot extract type from the runtime 'DocumentNode'", () =
})
})
it('graphql query cannot extract variable and reponse types', () => {
it('graphql query cannot extract variable and response types', () => {
const getUserById = parse(`
query GetUserById($userId: String!) {
user(id: $userId) {
@@ -217,7 +217,7 @@ it('graphql query cannot extract variable and reponse types', () => {
})
})
it('graphql mutation cannot extract variable and reponse types', () => {
it('graphql mutation cannot extract variable and response types', () => {
const createUser = parse(`
mutation CreateUser {
user {
+1 -1
View File
@@ -71,7 +71,7 @@ it('supports null as the request body type argument', () => {
})
})
it('returns plain Response withouth explicit response body type argument', () => {
it('returns plain Response without explicit response body type argument', () => {
http.get('/user', () => {
return new Response('hello')
})
+1 -1
View File
@@ -8,7 +8,7 @@ import {
export default defineConfig({
test: {
globals: true,
// Lookup the unit tests in the "src" directory becase
// Lookup the unit tests in the "src" directory because
// they are located next to the source code they are testing.
dir: './src',
alias: {