Skip to content

Commit

Permalink
move images around
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Dec 22, 2023
1 parent 929bd63 commit 9b638bc
Show file tree
Hide file tree
Showing 50 changed files with 223 additions and 213 deletions.
32 changes: 16 additions & 16 deletions packages/bsky/tests/__snapshots__/feed-generation.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,12 @@ Array [
"$type": "app.bsky.embed.images#view",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(5)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(5)@jpeg",
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(6)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(6)@jpeg",
},
Expand Down Expand Up @@ -517,7 +517,7 @@ Array [
"$type": "app.bsky.embed.images",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand All @@ -528,7 +528,7 @@ Array [
},
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand Down Expand Up @@ -721,12 +721,12 @@ Array [
"$type": "app.bsky.embed.images#view",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(5)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(5)@jpeg",
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(6)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(6)@jpeg",
},
Expand Down Expand Up @@ -777,7 +777,7 @@ Array [
"$type": "app.bsky.embed.images",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand All @@ -788,7 +788,7 @@ Array [
},
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand Down Expand Up @@ -937,12 +937,12 @@ Array [
"$type": "app.bsky.embed.images#view",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(4)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(4)@jpeg",
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(5)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(5)@jpeg",
},
Expand Down Expand Up @@ -987,7 +987,7 @@ Array [
"$type": "app.bsky.embed.images",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand All @@ -998,7 +998,7 @@ Array [
},
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand Down Expand Up @@ -1222,12 +1222,12 @@ Array [
"$type": "app.bsky.embed.images#view",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(4)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(4)@jpeg",
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(5)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(5)@jpeg",
},
Expand Down Expand Up @@ -1278,7 +1278,7 @@ Array [
"$type": "app.bsky.embed.images",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand All @@ -1289,7 +1289,7 @@ Array [
},
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand Down
8 changes: 4 additions & 4 deletions packages/bsky/tests/__snapshots__/indexing.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Array [
"$type": "app.bsky.embed.images#view",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(2)/cids(5)@jpeg",
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(2)/cids(5)@jpeg",
},
Expand Down Expand Up @@ -134,7 +134,7 @@ Array [
"$type": "app.bsky.embed.images",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand Down Expand Up @@ -245,7 +245,7 @@ Array [
"$type": "app.bsky.embed.images",
"images": Array [
Object {
"alt": "tests/sample-img/key-landscape-small.jpg",
"alt": "../dev-env/src/seed/img/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand All @@ -256,7 +256,7 @@ Array [
},
},
Object {
"alt": "tests/sample-img/key-alt.jpg",
"alt": "../dev-env/src/seed/img/key-alt.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
Expand Down
2 changes: 1 addition & 1 deletion packages/bsky/tests/algos/hot-classic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('algo hot-classic', () => {
it('returns well liked posts', async () => {
const img = await sc.uploadFile(
alice,
'tests/sample-img/key-landscape-small.jpg',
'../dev-env/src/seed/img/key-landscape-small.jpg',
'image/jpeg',
)
const one = await sc.post(alice, 'first post', undefined, [img])
Expand Down
10 changes: 5 additions & 5 deletions packages/bsky/tests/auto-moderator/takedowns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@ describe('takedowner', () => {
await network.processAll()
alice = sc.dids.alice
const fileBytes1 = await fs.readFile(
'tests/sample-img/key-portrait-small.jpg',
'../dev-env/src/seed/img/key-portrait-small.jpg',
)
const fileBytes2 = await fs.readFile(
'tests/sample-img/key-portrait-large.jpg',
'../dev-env/src/seed/img/key-portrait-large.jpg',
)
badCid1 = sha256RawToCid(await sha256(fileBytes1))
badCid2 = sha256RawToCid(await sha256(fileBytes2))
goodBlob = await sc.uploadFile(
alice,
'tests/sample-img/key-landscape-small.jpg',
'../dev-env/src/seed/img/key-landscape-small.jpg',
'image/jpeg',
)
badBlob1 = await sc.uploadFile(
alice,
'tests/sample-img/key-portrait-small.jpg',
'../dev-env/src/seed/img/key-portrait-small.jpg',
'image/jpeg',
)
badBlob2 = await sc.uploadFile(
alice,
'tests/sample-img/key-portrait-large.jpg',
'../dev-env/src/seed/img/key-portrait-large.jpg',
'image/jpeg',
)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/bsky/tests/image/sharp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ describe('sharp image processor', () => {
})

async function processFixture(fixture: string, options: Options) {
const image = createReadStream(`tests/sample-img/${fixture}`)
const image = createReadStream(`../dev-env/src/seed/img/${fixture}`)
const resized = await resize(image, options)
return await getInfo(resized)
}
Expand Down
Loading

0 comments on commit 9b638bc

Please sign in to comment.