Skip to content

Commit

Permalink
Whitelist foo.png in karma
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcarbs committed Sep 19, 2016
1 parent fb97131 commit df82617
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 29 deletions.
3 changes: 3 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ module.exports = (karmaConfig) => {
'./test/tests.bundle.js',
{ pattern: 'test/images/*', watched: false, included: false, served: true },
],
proxies: {
'/foo.png': '/base/test/images/foo.png',
},
formatError(msg) {
return msg
.split('\n')
Expand Down
4 changes: 0 additions & 4 deletions src/modules/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,6 @@ export default class Search extends Component {
renderResults = () => {
const { results } = this.props

if (_.isEmpty(results)) {
return this.renderNoResults()
}

return _.map(results, this.renderResult)
}

Expand Down
File renamed without changes
4 changes: 2 additions & 2 deletions test/specs/modules/Search/Search-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import faker from 'faker'
import React from 'react'

import * as common from 'test/specs/commonTests'
import { domEvent, sandbox, safeImageUrl } from 'test/utils'
import { domEvent, sandbox } from 'test/utils'
import Search from 'src/modules/Search/Search'
import SearchCategory from 'src/modules/Search/SearchCategory'
import SearchResult from 'src/modules/Search/SearchResult'
Expand Down Expand Up @@ -34,7 +34,7 @@ const wrapperRender = (...args) => (wrapper = render(...args))
const getOptions = (count = 5) => _.times(count, n => ({
title: _.times(3, faker.hacker.noun).join(' '),
description: _.times(3, faker.hacker.noun).join(' '),
image: safeImageUrl(),
image: 'foo.png',
price: faker.finance.amount(0, 100, 2, '$'),
}))

Expand Down
1 change: 0 additions & 1 deletion test/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { default as consoleUtil } from './consoleUtil'
export { default as domEvent } from './domEvent'
export { default as safeImageUrl } from './safeImageUrl'
export { default as sandbox } from './sandbox'
export { default as syntheticEvent } from './syntheticEvent'
22 changes: 0 additions & 22 deletions test/utils/safeImageUrl.js

This file was deleted.

0 comments on commit df82617

Please sign in to comment.