-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c43ab0
commit ece756d
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
app/components/Approvals/Snaps/helpers/constants/index.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { DelineatorType, getDelineatorTitle } from './index'; | ||
|
||
describe('Delineator Constants', () => { | ||
describe('DelineatorType enum', () => { | ||
it('should have the correct values', () => { | ||
expect(DelineatorType.Content).toBe('content'); | ||
expect(DelineatorType.Error).toBe('error'); | ||
expect(DelineatorType.Insights).toBe('insights'); | ||
expect(DelineatorType.Description).toBe('description'); | ||
expect(DelineatorType.Warning).toBe('warning'); | ||
}); | ||
}); | ||
|
||
describe('getDelineatorTitle', () => { | ||
it('should return correct title for Error type', () => { | ||
expect(getDelineatorTitle(DelineatorType.Error)).toBe('errorWithSnap'); | ||
}); | ||
|
||
it('should return correct title for Insights type', () => { | ||
expect(getDelineatorTitle(DelineatorType.Insights)).toBe( | ||
'insightsFromSnap', | ||
); | ||
}); | ||
|
||
it('should return correct title for Description type', () => { | ||
expect(getDelineatorTitle(DelineatorType.Description)).toBe( | ||
'descriptionFromSnap', | ||
); | ||
}); | ||
|
||
it('should return correct title for Warning type', () => { | ||
expect(getDelineatorTitle(DelineatorType.Warning)).toBe( | ||
'warningFromSnap', | ||
); | ||
}); | ||
|
||
it('should return default title for Content type', () => { | ||
expect(getDelineatorTitle(DelineatorType.Content)).toBe( | ||
'contentFromSnap', | ||
); | ||
}); | ||
|
||
it('should return default title for unknown type', () => { | ||
expect(getDelineatorTitle('unknown' as DelineatorType)).toBe( | ||
'contentFromSnap', | ||
); | ||
}); | ||
}); | ||
}); |