91 lines
1.7 KiB
Markdown
91 lines
1.7 KiB
Markdown
# Snapshot report for `tests/redirect.test.ts`
|
|
|
|
The actual snapshot is saved in `redirect.test.ts.snap`.
|
|
|
|
Generated by [AVA](https://avajs.dev).
|
|
|
|
## parseRedirect
|
|
|
|
> Class HostnameRedirect
|
|
|
|
HostnameRedirect {
|
|
parameters: {
|
|
enabled: true,
|
|
id: 1,
|
|
matcherType: 'hostname',
|
|
matcherValue: 'example.com',
|
|
redirectType: 'hostname',
|
|
redirectValue: 'example.org',
|
|
},
|
|
}
|
|
|
|
> Class SimpleRedirect
|
|
|
|
SimpleRedirect {
|
|
parameters: {
|
|
enabled: true,
|
|
id: 2,
|
|
matcherType: 'hostname',
|
|
matcherValue: 'example.com',
|
|
redirectType: 'simple',
|
|
redirectValue: 'https://example.org/simple',
|
|
},
|
|
}
|
|
|
|
> Class RegexRedirect
|
|
|
|
RegexRedirect {
|
|
parameters: {
|
|
enabled: true,
|
|
id: 3,
|
|
matcherType: 'regex',
|
|
matcherValue: '(.+)\\.com',
|
|
redirectType: 'regex',
|
|
redirectValue: '$1.org',
|
|
},
|
|
}
|
|
|
|
## Redirect.redirect
|
|
|
|
> 0 HostnameRedirect
|
|
|
|
{
|
|
original: 'https://example.com',
|
|
redirected: 'https://example.org/',
|
|
}
|
|
|
|
> 1 HostnameRedirect
|
|
|
|
{
|
|
original: 'https://example.com/path#hash?query=test',
|
|
redirected: 'https://example.org/path#hash?query=test',
|
|
}
|
|
|
|
> 2 SimpleRedirect
|
|
|
|
{
|
|
original: 'https://example.com',
|
|
redirected: 'https://example.org/simple',
|
|
}
|
|
|
|
> 3 SimpleRedirect
|
|
|
|
{
|
|
original: 'https://example.com/path',
|
|
redirected: 'https://example.org/simple',
|
|
}
|
|
|
|
> 4 RegexRedirect
|
|
|
|
{
|
|
original: 'https://example.com',
|
|
redirected: 'https://example.org/',
|
|
}
|
|
|
|
> 5 RegexRedirect
|
|
|
|
{
|
|
original: 'https://example.com/',
|
|
redirected: 'https://example.org/',
|
|
}
|