Skip to content

Commit

Permalink
fix(utf8): added one more utf8 test
Browse files Browse the repository at this point in the history
  • Loading branch information
olalonde committed Nov 5, 2016
1 parent b4af18e commit fe55c4f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { RandomStream } from 'common-streams'

const noop = async () => {}

export default ({
setup = noop,
export default ({ setup = noop,
teardown = noop,
} = {}) => {
let store
Expand Down Expand Up @@ -153,6 +152,17 @@ export default ({
t.equal(metadata.nonlatin, nonlatin)
})

test('utf-8 chars in metadata', async (t) => {
const uploadLength = 'bar'.length
const nonlatin = '大井っち.jpeg'
const { uploadId } = await store.create('foo', {
uploadLength,
metadata: { nonlatin },
})
const { metadata } = await store.info(uploadId)
t.equal(metadata.nonlatin, nonlatin)
})

test('beforeComplete is called', async (t) => {
const uploadLength = 'woot'.length
const { uploadId } = await store.create('foo', {
Expand Down

0 comments on commit fe55c4f

Please sign in to comment.