This repository was archived by the owner on Jul 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 529
Tests! #77
Merged
Merged
Tests! #77
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
67a03d7
Added mocha to package.json
fcc7bf6
feat(babel): add babel
859ec8b
Added mocha test command to package.json
9c6eba5
Added mocha to package.json
9f474e1
feat(babel): add babel
c8cde7a
Added mocha test command to package.json
f20a01e
Added <label> linked to <input>
f4bf11a
Corrected reference to labelText property
593a041
Added labelText and <label> styles to static-data example
95192ce
Added labelText and <label> styles to async-data example
f7f1b0d
Added labelText and <label> styles to custom-menu example
26e788b
Corrected spelling
c103c60
Removed testing references leftover from different branch
5e32893
Added accessible name to examples
defc469
Added test command and babel dependency
51b08d0
Initialized a wrapper for Autocomplete component in test
b4426b1
Added ref attribute to <label>
adfcd19
Put babel preset config behind 'test' environment variable
c01e9ac
Added jsdom setup file for tests
f6f89d4
Added global.window context to getComputedStyle() reference
add2aff
Added '|| 0' fallback in case getComputedStyle() returns empty string
cc99d9a
Moved utils.js into lib to be used also in tests
89abc2c
Added jsdom setup file to 'npm test' mocha command
190352e
Added two tests
16c7dca
Improved comment clarity
08b0c2a
Added tests and improved comments for Autocomplete kewDown->Enter eve…
0f4fc24
Changed keyUp simulated key to Backspace
a3873ce
Added test for keyDown->Escape event handlers
d7597b4
Added tests for Autocomplete kewDown->ArrowDown event handlers
69dea4a
Added tests for Autocomplete kewDown->ArrowUp event handlers
cfffd89
Added comments
16de503
Added unit tests for Autocomplete#renderMenu
dd0ae74
Added code coverage script
98001a2
Changed code coverage option to produce lcov detailed artifacts
a8306c4
Changed an expect() to check state instead of an arbitrary object pro…
b8d1d9a
Added test instructions to README
cd70cea
Added test for closing menu when input is blurred
001fb52
Fixed broken test order
6adb6a6
Removed unused devDependencies and added two needed root-level ones
bc725ff
Added back a missing parameter
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,7 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"presets": ["es2015", "stage-0", "react"] | ||
} | ||
} | ||
} |
This file contains hidden or 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,2 +1,3 @@ | ||
examples/**/*-bundle.js | ||
node_modules/ | ||
coverage/ |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -7,3 +7,8 @@ body { | |
.example { | ||
padding: 0 25px; | ||
} | ||
|
||
label { | ||
display: block; | ||
margin: 5px 0; | ||
} |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -7,3 +7,8 @@ body { | |
.example { | ||
padding: 0 25px; | ||
} | ||
|
||
label { | ||
display: block; | ||
margin: 5px 0; | ||
} |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -7,3 +7,8 @@ body { | |
.example { | ||
padding: 0 25px; | ||
} | ||
|
||
label { | ||
display: block; | ||
margin: 5px 0; | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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,6 @@ | ||
// .setup.js | ||
import { jsdom } from 'jsdom'; | ||
|
||
global.document = jsdom('<!doctype html><html><body></body></html>'); | ||
global.window = document.defaultView; | ||
global.navigator = global.window.navigator; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sprjr README test instructions. Is there more information that would be useful here?