Skip to content

Commit

Permalink
Fix broken tests due to missing sample data.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Dec 20, 2012
1 parent 7a67b00 commit abaa6f1
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/core/json-test.js
Expand Up @@ -9,7 +9,7 @@ suite.addBatch({
"json": { "json": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.json("examples/data/sample.json", function(error, json) { d3.json("test/data/sample.json", function(error, json) {
cb(null, json); cb(null, json);
}); });
}, },
Expand Down
4 changes: 2 additions & 2 deletions test/core/text-test.js
Expand Up @@ -9,7 +9,7 @@ suite.addBatch({
"text": { "text": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.text("examples/data/sample.txt", function(error, text) { d3.text("test/data/sample.txt", function(error, text) {
cb(null, text); cb(null, text);
}); });
}, },
Expand All @@ -22,7 +22,7 @@ suite.addBatch({
"": { "": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.text("examples/data/sample.txt", "text/plain+sample", function(error, text) { d3.text("test/data/sample.txt", "text/plain+sample", function(error, text) {
cb(null, text); cb(null, text);
}); });
}, },
Expand Down
6 changes: 3 additions & 3 deletions test/core/xhr-test.js
Expand Up @@ -9,12 +9,12 @@ suite.addBatch({
"xhr": { "xhr": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.xhr("examples/data/sample.txt", function(error, req) { d3.xhr("test/data/sample.txt", function(error, req) {
cb(null, req); cb(null, req);
}); });
}, },
"makes an asynchronous HTTP request": function(req) { "makes an asynchronous HTTP request": function(req) {
assert.equal(req._info.url, "examples/data/sample.txt"); assert.equal(req._info.url, "test/data/sample.txt");
assert.isTrue(req._info.async); assert.isTrue(req._info.async);
}, },
"invokes the callback with the request object": function(req) { "invokes the callback with the request object": function(req) {
Expand All @@ -30,7 +30,7 @@ suite.addBatch({
"": { "": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.xhr("examples/data/sample.txt", "text/plain", function(error, req) { d3.xhr("test/data/sample.txt", "text/plain", function(error, req) {
cb(null, req); cb(null, req);
}); });
}, },
Expand Down
4 changes: 2 additions & 2 deletions test/core/xml-test.js
Expand Up @@ -9,7 +9,7 @@ suite.addBatch({
"xml": { "xml": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.xml("examples/data/sample.xml", function(error, xml) { d3.xml("test/data/sample.xml", function(error, xml) {
cb(null, xml); cb(null, xml);
}); });
}, },
Expand All @@ -22,7 +22,7 @@ suite.addBatch({
"": { "": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.xml("examples/data/sample.txt", "application/xml+sample", function(error, xml) { d3.xml("test/data/sample.txt", "application/xml+sample", function(error, xml) {
cb(null, xml); cb(null, xml);
}); });
}, },
Expand Down
2 changes: 2 additions & 0 deletions test/data/sample.csv
@@ -0,0 +1,2 @@
Hello,World
42,"""fish"""
1 change: 1 addition & 0 deletions test/data/sample.json
@@ -0,0 +1 @@
[{"Hello": 42, "World": "\"fish\""}]
2 changes: 2 additions & 0 deletions test/data/sample.tsv
@@ -0,0 +1,2 @@
Hello World
42 """fish"""
1 change: 1 addition & 0 deletions test/data/sample.txt
@@ -0,0 +1 @@
Hello, world!
4 changes: 4 additions & 0 deletions test/data/sample.xml
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<hello>
<world name="Earth"/>
</hello>
2 changes: 1 addition & 1 deletion test/dsv/csv-test.js
Expand Up @@ -9,7 +9,7 @@ suite.addBatch({
"csv": { "csv": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.csv("examples/data/sample.csv", function(error, csv) { d3.csv("test/data/sample.csv", function(error, csv) {
cb(null, csv); cb(null, csv);
}); });
}, },
Expand Down
2 changes: 1 addition & 1 deletion test/dsv/tsv-test.js
Expand Up @@ -9,7 +9,7 @@ suite.addBatch({
"tsv": { "tsv": {
topic: function() { topic: function() {
var cb = this.callback; var cb = this.callback;
d3.tsv("examples/data/sample.tsv", function(error, tsv) { d3.tsv("test/data/sample.tsv", function(error, tsv) {
cb(null, tsv); cb(null, tsv);
}); });
}, },
Expand Down

0 comments on commit abaa6f1

Please sign in to comment.