mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 02:06:37 +08:00
prettier
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {describe, expect, it} from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {resolveZoneDomainInput} from '@/app/(main)/websites/components/resolve-zone-domain-input';
|
||||
import { resolveZoneDomainInput } from '@/app/(main)/websites/components/resolve-zone-domain-input';
|
||||
|
||||
describe('resolveZoneDomainInput', () => {
|
||||
it('maps short label and apex @ under zone root', () => {
|
||||
@@ -13,7 +13,9 @@ describe('resolveZoneDomainInput', () => {
|
||||
});
|
||||
|
||||
it('accepts full FQDN under the zone', () => {
|
||||
expect(resolveZoneDomainInput('www.api.example.com', 'example.com')).toEqual({
|
||||
expect(
|
||||
resolveZoneDomainInput('www.api.example.com', 'example.com'),
|
||||
).toEqual({
|
||||
domain: 'www.api.example.com',
|
||||
});
|
||||
expect(resolveZoneDomainInput('example.com', 'example.com')).toEqual({
|
||||
@@ -22,7 +24,11 @@ describe('resolveZoneDomainInput', () => {
|
||||
});
|
||||
|
||||
it('rejects foreign domains and wildcards', () => {
|
||||
expect(resolveZoneDomainInput('evil.com', 'example.com').error).toBeTruthy();
|
||||
expect(resolveZoneDomainInput('*.example.com', 'example.com').error).toBeTruthy();
|
||||
expect(
|
||||
resolveZoneDomainInput('evil.com', 'example.com').error,
|
||||
).toBeTruthy();
|
||||
expect(
|
||||
resolveZoneDomainInput('*.example.com', 'example.com').error,
|
||||
).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user