fix(deps): Update dependencies

This commit is contained in:
Joachim Van Herwegen
2022-02-01 15:00:19 +01:00
parent 52f400d344
commit d2870e5c8b
10 changed files with 5171 additions and 6169 deletions

View File

@@ -144,6 +144,10 @@ describe('A Solid server with IDP', (): void => {
});
});
afterAll(async(): Promise<void> => {
await state.session.logout();
});
it('initializes the session and logs in.', async(): Promise<void> => {
const url = await state.startSession();
await state.parseLoginPage(url);
@@ -226,6 +230,10 @@ describe('A Solid server with IDP', (): void => {
state = new IdentityTestState(baseUrl, redirectUrl, oidcIssuer);
});
afterAll(async(): Promise<void> => {
await state.session.logout();
});
it('can not log in with the old password anymore.', async(): Promise<void> => {
const url = await state.startSession();
nextUrl = url;
@@ -293,6 +301,10 @@ describe('A Solid server with IDP', (): void => {
email: newMail, password, confirmPassword: password, podName, createWebId: 'ok', register: 'ok', createPod: 'ok',
});
afterAll(async(): Promise<void> => {
await state.session.logout();
});
it('sends the form to create the WebID and register.', async(): Promise<void> => {
const res = await postForm(`${baseUrl}idp/register/`, formBody);
expect(res.status).toBe(200);

View File

@@ -111,5 +111,7 @@ describe('A server with restricted IDP access', (): void => {
expect(res.status).toBe(200);
const body = await res.json();
expect(body.webId).toBe(joinUrl(baseUrl, 'bob/profile/card#me'));
await state.session.logout();
});
});

View File

@@ -347,8 +347,9 @@ describe('AppRunner', (): void => {
setImmediate(resolve);
});
expect(error).toHaveBeenCalledWith('Unsupported positional arguments: "foo", "bar", "foo.txt", "bar.txt"');
expect(exit).toHaveBeenCalledTimes(1);
expect(error).toHaveBeenCalledWith('Unknown arguments: foo, bar, foo.txt, bar.txt');
// Yargs also calls process.exit in this case
expect(exit).toHaveBeenCalledTimes(2);
expect(exit).toHaveBeenCalledWith(1);
});

View File

@@ -66,7 +66,7 @@ describe('A TemplatedResourcesGenerator', (): void => {
expect(representation.binary).toBe(true);
expect(representation.metadata.contentType).toBe('text/turtle');
await expect(readableToString(representation.data)).resolves
.toEqual(`<${webId}> a <http://xmlns.com/foaf/0.1/Person>.`);
.toBe(`<${webId}> a <http://xmlns.com/foaf/0.1/Person>.`);
});
it('creates the necessary containers.', async(): Promise<void> => {
@@ -83,7 +83,7 @@ describe('A TemplatedResourcesGenerator', (): void => {
const { representation } = result[3];
await expect(readableToString(representation.data)).resolves
.toEqual(`<${webId}> a <http://xmlns.com/foaf/0.1/Person>.`);
.toBe(`<${webId}> a <http://xmlns.com/foaf/0.1/Person>.`);
});
it('copies the file stream directly if no template extension is found.', async(): Promise<void> => {

View File

@@ -209,7 +209,7 @@ describe('A DataAccessorBasedStore', (): void => {
const result = await store.getRepresentation(resourceID);
const contains = result.metadata.getAll(LDP.terms.contains);
expect(contains).toHaveLength(1);
expect(contains[0].value).toEqual(`${resourceID.path}resource`);
expect(contains[0].value).toBe(`${resourceID.path}resource`);
});
});

View File

@@ -96,8 +96,8 @@ describe('An InMemoryDataAccessor', (): void => {
children.push(child);
}
expect(children).toHaveLength(2);
expect(children[0].identifier.value).toEqual(`${base}container/resource`);
expect(children[1].identifier.value).toEqual(`${base}container/container2/`);
expect(children[0].identifier.value).toBe(`${base}container/resource`);
expect(children[1].identifier.value).toBe(`${base}container/container2/`);
});
it('adds stored metadata when requesting document metadata.', async(): Promise<void> => {
@@ -148,7 +148,7 @@ describe('An InMemoryDataAccessor', (): void => {
children.push(child);
}
expect(children).toHaveLength(1);
expect(children[0].identifier.value).toEqual(`${base}container/resource`);
expect(children[0].identifier.value).toBe(`${base}container/resource`);
await expect(accessor.getMetadata({ path: `${base}container/resource` }))
.resolves.toBeInstanceOf(RepresentationMetadata);
@@ -175,7 +175,7 @@ describe('An InMemoryDataAccessor', (): void => {
children.push(child);
}
expect(children).toHaveLength(1);
expect(children[0].identifier.value).toEqual(`${base}resource`);
expect(children[0].identifier.value).toBe(`${base}resource`);
await expect(accessor.getMetadata({ path: `${base}resource` }))
.resolves.toBeInstanceOf(RepresentationMetadata);

View File

@@ -62,7 +62,7 @@ describe('A QuadToRdfConverter', (): void => {
metadata: expect.any(RepresentationMetadata),
});
expect(result.metadata.contentType).toBe('text/turtle');
await expect(readableToString(result.data)).resolves.toEqual(
await expect(readableToString(result.data)).resolves.toBe(
`<http://test.com/s> <http://test.com/p> <http://test.com/o>.
`,
);
@@ -80,7 +80,7 @@ describe('A QuadToRdfConverter', (): void => {
const preferences: RepresentationPreferences = { type: { 'text/turtle': 1 }};
const result = await converter.handle({ identifier, representation, preferences });
expect(result.metadata.contentType).toBe('text/turtle');
await expect(readableToString(result.data)).resolves.toEqual(
await expect(readableToString(result.data)).resolves.toBe(
`@prefix dc: <http://purl.org/dc/terms/>.
@prefix test: <http://test.com/>.
@@ -99,7 +99,7 @@ test:s dc:modified test:o.
const preferences: RepresentationPreferences = { type: { 'text/turtle': 1 }};
const result = await converter.handle({ identifier, representation, preferences });
expect(result.metadata.contentType).toBe('text/turtle');
await expect(readableToString(result.data)).resolves.toEqual(
await expect(readableToString(result.data)).resolves.toBe(
`<> <#abc> <def/ghi>.
`,
);
@@ -120,7 +120,7 @@ test:s dc:modified test:o.
metadata: expect.any(RepresentationMetadata),
});
expect(result.metadata.contentType).toBe('application/ld+json');
await expect(readableToString(result.data)).resolves.toEqual(
await expect(readableToString(result.data)).resolves.toBe(
`[
{
"@id": "http://test.com/s",

View File

@@ -39,7 +39,7 @@ describe('PathUtil', (): void => {
});
it('joins Windows paths.', async(): Promise<void> => {
expect(joinFilePath('c:\\foo\\bar\\', '..', '/baz')).toEqual(`c:/foo/baz`);
expect(joinFilePath('c:\\foo\\bar\\', '..', '/baz')).toBe(`c:/foo/baz`);
});
});