Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cypress-io/react-tooltip
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5.1
Choose a base ref
...
head repository: cypress-io/react-tooltip
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.2
Choose a head ref
  • 3 commits
  • 12 files changed
  • 3 contributors

Commits on Jul 29, 2019

  1. chore(deps): update dependency jsdom to v15 (#10)

    * chore(deps): update dependency jsdom to v15
    
    * update to new jsdom api
    renovate[bot] authored and chrisbreiding committed Jul 29, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    ijjk JJ Kasper
    Copy the full SHA
    d18c058 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6610844 View commit details
  3. fix: prevent invalid (NaN) styles from being set (#26)

    * chore: improve ‘design’ mode
    
    * fix: handle arrow props being NaN
    chrisbreiding authored Jul 29, 2019
    Copy the full SHA
    8906cda View commit details
Showing with 1,564 additions and 405 deletions.
  1. +4 −1 README.md
  2. +0 −5 cypress/fixtures/example.json
  3. +0 −5 cypress/integration/design.js
  4. +5 −9 lib/test-setup.js
  5. +1,502 −373 package-lock.json
  6. +4 −3 package.json
  7. +22 −0 scripts/design.js
  8. +0 −7 scripts/watch.js
  9. +5 −0 src/main.jsx
  10. +3 −1 src/portal-popper.jsx
  11. +13 −0 src/portal-popper.spec.jsx
  12. +6 −1 static/design.html
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -36,10 +36,13 @@ updateCue | undefined | A prop that indicates that the tooltip's position should
```sh
# watches JS and SCSS for changes and compiles
# runs tests for associated
npm start
npm run watch

# run all tests
npm test

# creates a demo page at http:localhost:8888/design.html for design purposes
npm run design
```

## Changelog
5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/integration/design.js

This file was deleted.

14 changes: 5 additions & 9 deletions lib/test-setup.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
'use strict'

const chai = require('chai')
const jsdom = require('jsdom').jsdom
const { JSDOM } = require('jsdom')
const sinonChai = require('sinon-chai')

// http://airbnb.io/enzyme/docs/guides/jsdom.html
global.document = jsdom('')
const dom = new JSDOM(`<!DOCTYPE html>`)

global.window = dom.window
global.document = dom.window.document
global.document.createRange = () => ({
commonAncestorContainer: global.document.body,
setStart () {},
setEnd () {},
})
global.window = document.defaultView
Object.keys(document.defaultView).forEach((property) => {
if (typeof global[property] === 'undefined') {
global[property] = document.defaultView[property]
}
})
global.navigator = {
userAgent: 'node.js',
appVersion: { indexOf () {} },
Loading