-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 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 |
---|---|---|
@@ -1,7 +1,44 @@ | ||
jest.dontMock('../index'); | ||
|
||
var React = require('react/addons'); | ||
var TestUtils = React.addons.TestUtils; | ||
var ProgressHUD = require('../index'); | ||
|
||
describe('ProgressHUD', function() { | ||
it('should be a ReactElement', function() { | ||
var is_element = TestUtils.isElement( | ||
/*jshint ignore:start */ | ||
<ProgressHUD isVisible={false}/> | ||
/*jshint ignore:end */ | ||
); | ||
|
||
expect(is_element).toBe(true); | ||
}); | ||
|
||
it('should not be dismissible by default', function() { | ||
expect(ProgressHUD.defaultProps.isDismissible).toBe(false); | ||
}); | ||
|
||
it('should default to a black spinner', function() { | ||
expect(ProgressHUD.defaultProps.color).toBe('#000'); | ||
}); | ||
|
||
it('should default to a transparent overlay', function() { | ||
expect(ProgressHUD.defaultProps.overlayColor).toBe('rgba(0, 0, 0, 0)'); | ||
}); | ||
}); | ||
|
||
describe('Mixin', function() { | ||
it('should expose a Mixin', function() { | ||
expect(ProgressHUD.Mixin).toBeTruthy(); | ||
}); | ||
|
||
it('should expose a showProgressHUD method', function() { | ||
expect(ProgressHUD.Mixin.showProgressHUD).toBeTruthy(); | ||
}); | ||
|
||
it('should expose a dismissProgressHUD method', function() { | ||
expect(ProgressHUD.Mixin.dismissProgressHUD).toBeTruthy(); | ||
}); | ||
}); | ||
|