Skip to content

Commit

Permalink
chore: remove / from CID prefix query
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jul 2, 2021
1 parent f6a0102 commit b07aa1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/interface-blockstore-tests/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ module.exports = (test) => {
/** @type {Array<{ name: string, test: () => { query: any, expected: any}}>} */
const tests = [
{ name: 'empty', test: () => ({ query: {}, expected: [hello, world, hello2] }) },
{ name: 'prefix', test: () => ({ query: { prefix: `/${hello.key.toString().charAt(0)}` }, expected: [hello, world, hello2] }) },
{ name: 'prefix', test: () => ({ query: { prefix: hello.key.toString().charAt(0) }, expected: [hello, world, hello2] }) },
{ name: '1 filter', test: () => ({ query: { filters: [filter1] }, expected: [world, hello2] }) },
{ name: '2 filters', test: () => ({ query: { filters: [filter1, filter2] }, expected: [hello2] }) },
{ name: 'limit', test: () => ({ query: { limit: 1 }, expected: 1 }) },
Expand Down Expand Up @@ -513,7 +513,7 @@ module.exports = (test) => {
/** @type {Array<{ name: string, test: () => { query: any, expected: any}}>} */
const tests = [
{ name: 'empty', test: () => ({ query: {}, expected: [hello.key, world.key, hello2.key] }) },
{ name: 'prefix', test: () => ({ query: { prefix: `/${hello.key.toString().charAt(0)}` }, expected: [hello.key, world.key, hello2.key] }) },
{ name: 'prefix', test: () => ({ query: { prefix: hello.key.toString().charAt(0) }, expected: [hello.key, world.key, hello2.key] }) },
{ name: '1 filter', test: () => ({ query: { filters: [filter1] }, expected: [world.key, hello2.key] }) },
{ name: '2 filters', test: () => ({ query: { filters: [filter1, filter2] }, expected: [hello2.key] }) },
{ name: 'limit', test: () => ({ query: { limit: 1 }, expected: 1 }) },
Expand Down

0 comments on commit b07aa1d

Please sign in to comment.