Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin authored Nov 22, 2023
2 parents 6a27db0 + 22d5742 commit 0737d0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"*": "prettier --write"
"*": "prettier --write --ignore-unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4990,7 +4990,7 @@ Object {
}
`;

exports[`getStaticPathsFromContext it returns static paths for multiple resoure types from context 1`] = `
exports[`getStaticPathsFromContext it returns static paths for multiple resource types from context 1`] = `
Array [
Object {
"locale": "en",
Expand Down
16 changes: 8 additions & 8 deletions packages/next-drupal/tests/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ describe("getResource", () => {
)
})

test("it throws an error if revision access if forbidden", async () => {
test("it throws an error if revision access is forbidden", async () => {
const client = new DrupalClient(BASE_URL)

await expect(
Expand All @@ -926,7 +926,7 @@ describe("getResource", () => {
}
)
).rejects.toThrow(
"403 Forbidden\nThe current user is not allowed to GET the selected resource. The user does not have access to the requested version."
"401 Unauthorized\nNo authentication credentials provided."
)
})

Expand Down Expand Up @@ -1093,7 +1093,7 @@ describe("getResourceByPath", () => {
)
})

test("it throws an error if revision access if forbidden", async () => {
test("it throws an error if revision access is forbidden", async () => {
const client = new DrupalClient(BASE_URL)

await expect(
Expand All @@ -1107,7 +1107,7 @@ describe("getResourceByPath", () => {
}
)
).rejects.toThrow(
"403 Forbidden\nThe current user is not allowed to GET the selected resource. The user does not have access to the requested version."
"401 Unauthorized\nNo authentication credentials provided."
)
})

Expand Down Expand Up @@ -1324,7 +1324,7 @@ describe("getResourceFromContext", () => {
)
})

test("it throws an error if revision access if forbidden", async () => {
test("it throws an error if revision access is forbidden", async () => {
const client = new DrupalClient(BASE_URL)

const context: GetStaticPropsContext = {
Expand All @@ -1343,7 +1343,7 @@ describe("getResourceFromContext", () => {
},
})
).rejects.toThrow(
"403 Forbidden\nThe current user is not allowed to GET the selected resource. The user does not have access to the requested version."
"401 Unauthorized\nNo authentication credentials provided."
)
})

Expand Down Expand Up @@ -1895,7 +1895,7 @@ describe("getStaticPathsFromContext", () => {
expect(paths).toMatchSnapshot()
})

test("it returns static paths for multiple resoure types from context", async () => {
test("it returns static paths for multiple resource types from context", async () => {
const client = new DrupalClient(BASE_URL)

const paths = await client.getStaticPathsFromContext(
Expand Down Expand Up @@ -2608,7 +2608,7 @@ describe("getAuthFromContextAndOptions", () => {
)
})

test("if in preview and using the jwt plugin, t should use the access token from context even with global withAuth", async () => {
test("if in preview and using the jwt plugin, it should use the access token from context even with global withAuth", async () => {
const client = new DrupalClient(BASE_URL, {
auth: {
clientId: "7795065e-8ad0-45eb-a64d-73d9f3a5e943",
Expand Down

0 comments on commit 0737d0c

Please sign in to comment.