Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 7951a16

Browse files
authored
Merge pull request #261 from netlify/chore/add-tests
chore: add more tests
2 parents 353e748 + 69eea9e commit 7951a16

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[redirects]]
2+
from = "old-path"
3+
to = "new-path"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/ index.html
2+
/blog blog.html
3+
/trt-therapy-san-diego trt-therapy-san-diego.html

tests/line_parser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ each(
163163
{ title: 'invalid_no_to_no_status', errorMessage: /Missing destination/ },
164164
{ title: 'invalid_no_to_status', errorMessage: /Missing "to" field/ },
165165
{ title: 'invalid_no_to_query', errorMessage: /Missing destination/ },
166+
{ title: 'invalid_no_slash', errorMessage: /Missing destination/ },
166167
{ title: 'invalid_mistaken_headers', errorMessage: /Missing destination/ },
167168
],
168169
({ title }, { fixtureName = title, errorMessage }) => {

tests/netlify_config_parser.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ each(
5656
title: 'from_forward',
5757
output: [{ path: '/old-path/*', to: '/old-path/:splat', status: 200 }],
5858
},
59+
{
60+
title: 'from_no_slash',
61+
output: [{ path: 'old-path', to: 'new-path' }],
62+
},
5963
{
6064
title: 'query',
6165
output: [{ path: '/old-path', to: '/new-path', query: { path: ':path' } }],

0 commit comments

Comments
 (0)