Created
April 3, 2011 04:11
-
-
Save dukex/900170 to your computer and use it in GitHub Desktop.
string_spec.js
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
String.prototype.reverse = function(){ | |
return this.split("").reverse().join(""); | |
} |
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
describe("String", function () { | |
describe("reverse", function () { | |
it("should reverse 'ola mundo'", function () { | |
expect("ola mundo".reverse()).toEqual("odnum alo"); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment