Skip to content

Commit 450d3c3

Browse files
authored
Merge pull request #3 from joseluisq/develop
UMD support
2 parents d4c023f + b6e40ef commit 450d3c3

File tree

13 files changed

+3799
-26
lines changed

13 files changed

+3799
-26
lines changed

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
37
"rules": {
48
"prefer-arrow-callback": 2,
59
"semi": [

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/prelodr.js
1+
/react-prelodr.js
22
!modules
33
node_modules
44
bower_components

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ branches:
1515
only:
1616
- master
1717
- /^greenkeeper-/
18+
- /^develop-/
1819

1920
notifications:
2021
email: false
2122

23+
cache:
24+
directories:
25+
- node_modules
26+
2227
before_install:
2328
- npm install -g npm
2429
- npm --version
30+
2531
after_success: npm run coverage

__tests__/prelodr.test.js renamed to __tests__/react-prelodr.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/* global describe, it, expect, jest */
22

33
import React from 'react'
4-
import Prelodr from '../src/prelodr'
54
import { mount } from 'enzyme'
5+
import Prelodr from '../src/react-prelodr'
66

77
jest.useFakeTimers()
88

99
const myShowMock = jest.fn()
1010
const myHideMock = jest.fn()
11+
1112
const wrapper = mount(
1213
<Prelodr
1314
prefixClass='prelodr'
@@ -38,7 +39,7 @@ describe('react-prelodr test suite', () => {
3839
expect(node.getPrelodr()).toBeDefined()
3940
})
4041

41-
it('api should be defined', () => {
42+
it('should be contain the text', () => {
4243
node.show(str).hide()
4344
expect(wrapper.text()).toContain(str)
4445
})

0 commit comments

Comments
 (0)