Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

Commit

Permalink
tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Jul 16, 2016
1 parent 7a956dc commit 5b64361
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
15 changes: 3 additions & 12 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import projectPaths from './config/projectPaths'
gulp.task('build', ['build:core', 'build:react'])
gulp.task('build:prod', ['production', 'build'])

gulp.task('build:core', () => buildFile(projectPaths.entry, 'index'))
gulp.task('build:react', () => buildFile(projectPaths.reactEntry, 'react'))


/**
* Sets the current chain of tasks to 'production mode'.
Expand All @@ -30,18 +33,6 @@ gulp.task('production', () => {
})


/**
* Build the core library.
*/
gulp.task('build:core', () => buildFile(projectPaths.entry, 'index'))


/**
* Build the react run modules.
*/
gulp.task('build:react', () => buildFile(projectPaths.reactEntry, 'react'))


/**
* Run the test suite once.
*/
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"eslint-plugin-react": "^3.5.1",
"gulp": "^3.9.0",
"gulp-env": "^0.2.0",
"karma": "^0.13.22",
"karma": "^1.1.1",
"karma-chrome-launcher": "^0.2.1",
"karma-coverage": "^0.5.5",
"karma-firefox-launcher": "^0.1.6",
Expand All @@ -49,6 +49,7 @@
"webpack-stream": "^2.1.1"
},
"dependencies": {
"karma": "^1.1.1",
"lodash": "^4.2.1",
"mediaquery": "0.0.3",
"redux": "^3.5.2"
Expand Down
4 changes: 2 additions & 2 deletions src/components/stylesheet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// external imports
import {connect} from 'react-redux'
// import {connect} from 'react-redux'
import mapValues from 'lodash/mapValues'
import sortBy from 'lodash/sortBy'

Expand Down Expand Up @@ -126,7 +126,7 @@ const defaultOptions = {

// export a higher order component
export default (stylesheet, opts) => (component) => (
connect(
require('react-redux').connect( // eslint-disable-line no-undef
mapStateToPropsFactory(stylesheet, {...defaultOptions, ...opts})
)(component)
)
9 changes: 6 additions & 3 deletions tests/test_stylesheet.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

import 'babel-polyfill'

// local imports
import {
parsePattern,
browserMatches,
sortKeys,
transformStyle,
} from '../src/components/stylesheet'

// fix the testing environment
import 'babel-polyfill'
// import {parsePattern} from 'components/stylesheet'
// // fix the testing environment
// import foo from 'components/stylesheet'

describe('ReactStyleSheet', function () {
it("can parse the relevant data from style patterns", function() {
Expand Down

0 comments on commit 5b64361

Please sign in to comment.