[ci] format

This commit is contained in:
matthewp 2022-05-04 18:56:21 +00:00 committed by github-actions[bot]
parent 6643a3931d
commit e087f27a9b
2 changed files with 10 additions and 10 deletions

View file

@ -479,12 +479,12 @@ export function get({ params, request }) {
//...
}
Update your code to remove this warning.`)
Update your code to remove this warning.`);
}
const context = {
request,
params
params,
};
const proxy = new Proxy(context, {
@ -505,7 +505,7 @@ Update your code to remove this warning.`);
} else {
return undefined;
}
}
},
}) as APIContext & Params;
return await handler.call(mod, proxy, request);

View file

@ -15,19 +15,19 @@ describe('API routes', () => {
const one = JSON.parse(await fixture.readFile('/old-api/twoarg/one.json'));
expect(one).to.deep.equal({
param: 'one',
pathname: '/old-api/twoarg/one.json'
pathname: '/old-api/twoarg/one.json',
});
const two = JSON.parse(await fixture.readFile('/old-api/twoarg/two.json'));
expect(two).to.deep.equal({
param: 'two',
pathname: '/old-api/twoarg/two.json'
pathname: '/old-api/twoarg/two.json',
});
});
it('param first argument is supported', async () => {
const one = JSON.parse(await fixture.readFile('/old-api/onearg/one.json'));
expect(one).to.deep.equal({
param: 'one'
param: 'one',
});
});
});
@ -37,7 +37,7 @@ describe('API routes', () => {
const one = JSON.parse(await fixture.readFile('/context/data/one.json'));
expect(one).to.deep.equal({
param: 'one',
pathname: '/context/data/one.json'
pathname: '/context/data/one.json',
});
});
});