-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Monorepo! Publish framework specific packages (#42)
* Add Lerna * v1.3.0-beta * fix publish please use * v1.3.0-beta2 * start migration * Almost there! * This might be it! * v2.0.0-rc1 * add readmez * notes * Update README.md * Update README.md * Update * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * package updates * prepublish build * v2.0.0-rc2 * v2.0.0-rc3 * fix lint and flow * v2.0.0-rc4 * circleci fixes * circleci fixes * fix circleci yml * circleci: use dep field * fix jasmine call * add jasmine to devDeps
- Loading branch information
1 parent
43fadb1
commit c7ff18b
Showing
104 changed files
with
2,028 additions
and
2,028 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/node_modules/** | ||
**/lib/** | ||
**/*.fixture.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.*/node_modules/fbjs.* | ||
|
||
[include] | ||
./packages/enzyme-matchers/src/index.js | ||
|
||
[libs] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
lib/ | ||
npm-debug.log | ||
lerna-debug.log | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,8 @@ machine: | |
|
||
test: | ||
pre: | ||
- npm run lint | ||
- lerna run lint | ||
|
||
dependencies: | ||
post: | ||
- lerna bootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"lerna": "2.0.0-beta.30", | ||
"version": "2.0.0-rc4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
{ | ||
"name": "jasmine-enzyme", | ||
"version": "1.2.0", | ||
"description": "Jasmine assertions for enzyme", | ||
"main": "lib/index.js", | ||
"name": "enzyme-assertions", | ||
"description": "Testing Helpers for Enzyme", | ||
"author": "Blaine Kasten<[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "jest", | ||
"lint": "eslint ./src", | ||
"build": "rimraf lib && babel src --out-dir lib --ignore tests", | ||
"prior-to-publish": "npm run lint && npm test && npm run build", | ||
"publish-please": "publish-please", | ||
"prepublish": "publish-please guard" | ||
"pretest": "node ./scripts/jest.js", | ||
"test": "npm run test-matchers && npm run test-jasmine && npm run test-jest", | ||
"test-matchers": "cd ./packages/enzyme-matchers && npm run jest", | ||
"test-jasmine": "cd ./packages/jasmine-enzyme && npm run jest && npm run jasmine", | ||
"test-jest": "cd ./packages/jest-enzyme && npm run jest", | ||
"lint": "eslint ./packages" | ||
}, | ||
"files": [ | ||
"src", | ||
"lib" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/blainekasten/jasmine-enzyme.git" | ||
"url": "git+https://github.com/blainekasten/enzyme-matchers.git" | ||
}, | ||
"keywords": [ | ||
"javascript", | ||
|
@@ -35,11 +35,6 @@ | |
"jest", | ||
"enzyme" | ||
], | ||
"author": "Blaine Kasten<[email protected]>", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"enzyme": "1.x || 2.x" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.5.1", | ||
"babel-eslint": "^6.0.0", | ||
|
@@ -52,22 +47,19 @@ | |
"eslint": "^2.7.0", | ||
"eslint-config-airbnb": "^6.2.0", | ||
"eslint-plugin-react": "^4.3.0", | ||
"jest-cli": "^12.0.0", | ||
"publish-please": "^2.1.4", | ||
"jest-cli": "^16.0.1", | ||
"react": "^0.14.7", | ||
"react-addons-test-utils": "^0.14.7", | ||
"react-dom": "^0.14.7", | ||
"readline-sync": "^1.4.1", | ||
"rimraf": "^2.5.0" | ||
"rimraf": "^2.5.0", | ||
"lerna": "2.0.0-beta.30" | ||
}, | ||
"jest": { | ||
"testPathDirs": [ | ||
"<rootDir>/src" | ||
], | ||
"setupTestFrameworkScriptFile": "./src/jest.js", | ||
"unmockedModulePathPatterns": [ | ||
"enzyme", | ||
"react" | ||
"<rootDir>/packages/jasmine-enzyme/src", | ||
"<rootDir>/packages/jest-enzyme/src", | ||
"<rootDir>/packages/enzyme-matchers/src" | ||
], | ||
"verbose": true | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# enzyme-matchers | ||
|
||
[![npm version](https://img.shields.io/npm/v/enzyme-matchers.svg)](https://www.npmjs.com/package/enzyme-matchers) | ||
![License](https://img.shields.io/npm/l/chai-enzyme.svg) | ||
[![Circle CI](https://circleci.com/gh/blainekasten/enzyme-matchers/tree/master.svg?style=svg)](https://circleci.com/gh/blainekasten/enzyme-matchers/tree/master) | ||
|
||
This package is primarily meant to be consumed by framework integrations within [this monorepo](https://github.com/blainekasten/enzyme-matchers). Though it can be used standalone. Look at the source if you want to see how it's used. | ||
|
||
### Installation | ||
|
||
We suggest using [yarn](https://github.com/yarnpkg/yarn) for installations. | ||
|
||
``` | ||
yarn add enzyme-matchers --dev | ||
``` | ||
|
||
But npm works too! | ||
|
||
``` | ||
$ npm install enzyme-matchers --save-dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "enzyme-matchers", | ||
"version": "2.0.0-rc4", | ||
"description": "Testing Matchers for Enzyme", | ||
"main": "lib/index.js", | ||
"homepage": "https://github.com/blainekasten/enzyme-matchers/packages/enzyme-matchers#readme", | ||
"author": "Blaine Kasten <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"pretest": "node ../../scripts/jest.js", | ||
"test": "jest", | ||
"jest": "jest", | ||
"lint": "eslint ./src", | ||
"prepublish": "npm run build", | ||
"build": "babel src --out-dir lib --ignore tests" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/blainekasten/enzyme-matchers.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/blainekasten/enzyme-matchers/issues" | ||
}, | ||
"peerDependencies": { | ||
"enzyme": "1.x || 2.x" | ||
}, | ||
"dependencies": { | ||
"deep-equal-ident": "^1.1.1" | ||
}, | ||
"jest": { | ||
"testPathDirs": [ | ||
"<rootDir>/src" | ||
], | ||
"verbose": true | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
packages/enzyme-matchers/src/assertions/__tests__/toBeChecked--tests.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const { shallow } = require('enzyme'); | ||
const React = require('react'); | ||
const toBeChecked = require('../toBeChecked'); | ||
|
||
function Fixture() { | ||
return ( | ||
<div> | ||
<input id="checked" defaultChecked /> | ||
<input id="not" defaultChecked={false} /> | ||
<input id="tertiary" defaultChecked checked={false} /> | ||
</div> | ||
); | ||
} | ||
|
||
describe('toBeChecked', () => { | ||
const wrapper = shallow(<Fixture />); | ||
const truthyResults = toBeChecked(wrapper.find('#checked')); | ||
const falsyResults = toBeChecked(wrapper.find('#not')); | ||
|
||
it('returns the pass flag properly', () => { | ||
expect(truthyResults.pass).toBeTruthy(); | ||
expect(falsyResults.pass).toBeFalsy(); | ||
}); | ||
|
||
it('returns the message with the proper pass/fail verbage', () => { | ||
expect(truthyResults.message).not.toContain('not'); | ||
expect(falsyResults.message).toContain('not'); | ||
}); | ||
}); | ||
|
Oops, something went wrong.