[Pkg-javascript-commits] [node-entities] 34/63: tests: reformatted tests
Wolfgang Borgert
debacle at moszumanska.debian.org
Mon Sep 22 08:15:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository node-entities.
commit 2ca520abc65f9b5b096e9be50840076ccaf400d2
Author: fb55 <me at feedic.com>
Date: Sun Feb 16 20:22:01 2014 +0100
tests: reformatted tests
---
test/test.js | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/test/test.js b/test/test.js
index 172aa4e..5e418a7 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,7 +1,7 @@
-var assert = require("assert");
-var entities = require('../');
+var assert = require("assert"),
+ entities = require('../');
-describe("Encode->decode test", function() {
+describe("Encode->decode test", function(){
var testcases = [
{
input: "asdf & ÿ ü '",
@@ -17,30 +17,30 @@ describe("Encode->decode test", function() {
];
testcases.forEach(function(tc) {
var encodedXML = entities.encodeXML(tc.input);
- it("should XML encode " + tc.input, function() {
+ it("should XML encode " + tc.input, function(){
assert.equal(encodedXML, tc.xml);
});
- it("should XML decode " + encodedXML, function() {
+ it("should XML decode " + encodedXML, function(){
assert.equal(entities.decodeXML(encodedXML), tc.input);
});
var encodedHTML4 = entities.encodeHTML4(tc.input);
- it("should HTML4 encode " + tc.input, function() {
+ it("should HTML4 encode " + tc.input, function(){
assert.equal(encodedHTML4, tc.html4);
});
- it("should HTML4 decode " + encodedHTML4, function() {
+ it("should HTML4 decode " + encodedHTML4, function(){
assert.equal(entities.decodeHTML4(encodedHTML4), tc.input);
});
var encodedHTML5 = entities.encodeHTML5(tc.input);
- it("should HTML5 encode " + tc.input, function() {
+ it("should HTML5 encode " + tc.input, function(){
assert.equal(encodedHTML5, tc.html5);
});
- it("should HTML5 decode " + encodedHTML5, function() {
+ it("should HTML5 decode " + encodedHTML5, function(){
assert.equal(entities.decodeHTML5(encodedHTML5), tc.input);
});
});
});
-describe("Decode test", function() {
+describe("Decode test", function(){
var testcases = [
{ input: "&", output: "&" },
{ input: "&", output: "&" },
@@ -55,13 +55,13 @@ describe("Decode test", function() {
{ input: ":", output: ":" }
];
testcases.forEach(function(tc) {
- it("should XML decode " + tc.input, function() {
+ it("should XML decode " + tc.input, function(){
assert.equal(entities.decodeXML(tc.input), tc.output);
});
- it("should HTML4 decode " + tc.input, function() {
+ it("should HTML4 decode " + tc.input, function(){
assert.equal(entities.decodeHTML4(tc.input), tc.output);
});
- it("should HTML5 decode " + tc.input, function() {
+ it("should HTML5 decode " + tc.input, function(){
assert.equal(entities.decodeHTML5(tc.input), tc.output);
});
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-entities.git
More information about the Pkg-javascript-commits
mailing list