-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross referencing user feedback and tests #78
Merged
Merged
Changes from all commits
Commits
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 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,77 @@ | ||
|
||
/** | ||
<pre> | ||
======== A Handy Little Jasmine Reference ======== | ||
https://github.com/pivotal/jasmine/wiki/Matchers | ||
|
||
Spec matchers: | ||
expect(x).toEqual(y); compares objects or primitives x and y and passes if they are equivalent | ||
expect(x).toBe(y); compares objects or primitives x and y and passes if they are the same object | ||
expect(x).toMatch(pattern); compares x to string or regular expression pattern and passes if they match | ||
expect(x).toBeDefined(); passes if x is not undefined | ||
expect(x).toBeUndefined(); passes if x is undefined | ||
expect(x).toBeNull(); passes if x is null | ||
expect(x).toBeTruthy(); passes if x evaluates to true | ||
expect(x).toBeFalsy(); passes if x evaluates to false | ||
expect(x).toContain(y); passes if array or string x contains y | ||
expect(x).toBeLessThan(y); passes if x is less than y | ||
expect(x).toBeGreaterThan(y); passes if x is greater than y | ||
expect(function(){fn();}).toThrow(e); passes if function fn throws exception e when executed | ||
|
||
Every matcher's criteria can be inverted by prepending .not: | ||
expect(x).not.toEqual(y); compares objects or primitives x and y and passes if they are not equivalent | ||
|
||
Custom matchers help to document the intent of your specs, and can help to remove code duplication in your specs. | ||
beforeEach(function() { | ||
this.addMatchers({ | ||
|
||
toBeLessThan: function(expected) { | ||
var actual = this.actual; | ||
var notText = this.isNot ? " not" : ""; | ||
|
||
this.message = function () { | ||
return "Expected " + actual + notText + " to be less than " + expected; | ||
} | ||
|
||
return actual < expected; | ||
} | ||
|
||
}); | ||
}); | ||
</pre> | ||
|
||
* @requires FieldDB | ||
* @requires Jasmine | ||
* | ||
* @example FieldDB | ||
* @module FieldDBTest | ||
* @extends Jasmine.spec | ||
*/ | ||
describe("tagcloud", function() { | ||
|
||
it("should automatically detect if a user is making a tag cloud #66", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
|
||
it("should allow all the words typed to go into the cloud #66", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
|
||
it("should duplicate to fill space #66 ", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
it("It should work with Japanese #72 ", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
it("Should work on Chromebooks #73", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
it("Should be able to move the words around #63", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
it("Should be a kid friendly mode #69", function() { | ||
expect(true).toBeTruthy(); | ||
}); | ||
|
||
|
||
}); |
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
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.
@vronvali for #68 you can modify this test to have 4-ish tests like this one, for each user type you found in #76