Skip to content

Commit 98a2ba9

Browse files
committed
Add extra test for #625
1 parent f06b560 commit 98a2ba9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

test/HistoryApiFallback.test.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ describe("HistoryApiFallback", function() {
4747
server = helper.start(config2, {
4848
contentBase: path.join(__dirname, "fixtures/historyapifallback-2-config"),
4949
historyApiFallback: {
50-
index: "/bar.html"
50+
index: "/bar.html",
51+
disableDotRule: true
5152
}
5253
}, done);
5354
req = request(server.app);
@@ -58,5 +59,17 @@ describe("HistoryApiFallback", function() {
5859
.accept("html")
5960
.expect(200, /Foobar/, done);
6061
});
62+
63+
it("request to directory", function(done) {
64+
req.get("/foo")
65+
.accept("html")
66+
.expect(200, /Foobar/, done);
67+
});
68+
69+
it("contentBase file should take preference above historyApiFallback", function(done) {
70+
req.get("/other.html")
71+
.accept("html")
72+
.expect(200, /Other file/, done);
73+
});
6174
});
6275
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Other file

0 commit comments

Comments
 (0)