Add enabled property to tests.
This commit is contained in:
		
							parent
							
								
									055be574c5
								
							
						
					
					
						commit
						ed663484e2
					
				| 
						 | 
					@ -16,6 +16,7 @@ import {
 | 
				
			||||||
} from '../source/redirect/exports.js';
 | 
					} from '../source/redirect/exports.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const hostnameParameters: RedirectParameters = {
 | 
					const hostnameParameters: RedirectParameters = {
 | 
				
			||||||
 | 
					  enabled: true,
 | 
				
			||||||
  matcherType: 'hostname',
 | 
					  matcherType: 'hostname',
 | 
				
			||||||
  matcherValue: 'example.com',
 | 
					  matcherValue: 'example.com',
 | 
				
			||||||
  redirectType: 'hostname',
 | 
					  redirectType: 'hostname',
 | 
				
			||||||
| 
						 | 
					@ -23,6 +24,7 @@ const hostnameParameters: RedirectParameters = {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const simpleParameters: RedirectParameters = {
 | 
					const simpleParameters: RedirectParameters = {
 | 
				
			||||||
 | 
					  enabled: true,
 | 
				
			||||||
  matcherType: 'hostname',
 | 
					  matcherType: 'hostname',
 | 
				
			||||||
  matcherValue: 'example.com',
 | 
					  matcherValue: 'example.com',
 | 
				
			||||||
  redirectType: 'simple',
 | 
					  redirectType: 'simple',
 | 
				
			||||||
| 
						 | 
					@ -89,6 +91,7 @@ test('Redirect.isMatch', (t) => {
 | 
				
			||||||
  } as unknown as HostnameRedirect['parameters']);
 | 
					  } as unknown as HostnameRedirect['parameters']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const regexMatch = new HostnameRedirect({
 | 
					  const regexMatch = new HostnameRedirect({
 | 
				
			||||||
 | 
					    enabled: true,
 | 
				
			||||||
    matcherType: 'regex',
 | 
					    matcherType: 'regex',
 | 
				
			||||||
    matcherValue: String.raw`^https://(www\.)?example.org/$`,
 | 
					    matcherValue: String.raw`^https://(www\.)?example.org/$`,
 | 
				
			||||||
    redirectType: 'simple',
 | 
					    redirectType: 'simple',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,7 @@ Generated by [AVA](https://avajs.dev).
 | 
				
			||||||
    HostnameRedirect {
 | 
					    HostnameRedirect {
 | 
				
			||||||
      id: 'id',
 | 
					      id: 'id',
 | 
				
			||||||
      parameters: {
 | 
					      parameters: {
 | 
				
			||||||
 | 
					        enabled: true,
 | 
				
			||||||
        matcherType: 'hostname',
 | 
					        matcherType: 'hostname',
 | 
				
			||||||
        matcherValue: 'example.com',
 | 
					        matcherValue: 'example.com',
 | 
				
			||||||
        redirectType: 'hostname',
 | 
					        redirectType: 'hostname',
 | 
				
			||||||
| 
						 | 
					@ -23,6 +24,7 @@ Generated by [AVA](https://avajs.dev).
 | 
				
			||||||
    SimpleRedirect {
 | 
					    SimpleRedirect {
 | 
				
			||||||
      id: 'id',
 | 
					      id: 'id',
 | 
				
			||||||
      parameters: {
 | 
					      parameters: {
 | 
				
			||||||
 | 
					        enabled: true,
 | 
				
			||||||
        matcherType: 'hostname',
 | 
					        matcherType: 'hostname',
 | 
				
			||||||
        matcherValue: 'example.com',
 | 
					        matcherValue: 'example.com',
 | 
				
			||||||
        redirectType: 'simple',
 | 
					        redirectType: 'simple',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue