-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
16 changed files
with
106 additions
and
100 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,8 +1,41 @@ | ||
import * as e from 'express'; | ||
Check failure on line 1 in projects/common/src/lib/pipes/sc2-map-name.pipe.spec.ts GitHub Actions / build (18.x)
|
||
import { SC2Map } from '../../public_api'; | ||
import { Sc2MapNamePipe } from './sc2-map-name.pipe'; | ||
|
||
|
||
describe('Sc2MapNamePipe', () => { | ||
it('create an instance', () => { | ||
const pipe = new Sc2MapNamePipe(); | ||
let pipe: Sc2MapNamePipe; | ||
|
||
beforeEach(() => { | ||
pipe = new Sc2MapNamePipe(); | ||
}); | ||
|
||
it('should create an instance', () => { | ||
expect(pipe).toBeTruthy(); | ||
}); | ||
|
||
it('should return the name of the map', () => { | ||
expect(pipe.transform(SC2Map.TritonLE)).toEqual('Triton LE'); | ||
expect(pipe.transform(SC2Map.OxideLE)).toEqual('Oxide LE'); | ||
expect(pipe.transform(SC2Map.EternalEmpireLE)).toEqual('Eternal Empire LE'); | ||
expect(pipe.transform(SC2Map.PurityAndIndustryLE)).toEqual('Purity and Industry LE'); | ||
expect(pipe.transform(SC2Map.EverDreamLE)).toEqual('Ever Dream LE'); | ||
expect(pipe.transform(SC2Map.SubmarineLE)).toEqual('Submarine LE'); | ||
expect(pipe.transform(SC2Map.DeathauraLE)).toEqual('Deathaura LE'); | ||
expect(pipe.transform(SC2Map.PillarsofGoldLE)).toEqual('Pillars of Gold LE'); | ||
expect(pipe.transform(SC2Map.ZenLE)).toEqual('Zen LE'); | ||
expect(pipe.transform(SC2Map.SimulacrumLE)).toEqual('Simulacrum LE'); | ||
expect(pipe.transform(SC2Map.NightshadeLE)).toEqual('Nightshade LE'); | ||
expect(pipe.transform(SC2Map.GoldenWallLE)).toEqual('Golden Wall LE'); | ||
expect(pipe.transform(SC2Map.EphemeronLE)).toEqual('Ephemeron LE'); | ||
expect(pipe.transform(SC2Map.WorldofSleepersLE)).toEqual('World of Sleepers LE'); | ||
expect(pipe.transform(SC2Map.IceAndChromeLE)).toEqual('Ice and Chrome LE'); | ||
expect(pipe.transform(SC2Map.RomanticideLE)).toEqual('Romanticide LE'); | ||
expect(pipe.transform(SC2Map.JagannathaLE)).toEqual('Jagannatha LE'); | ||
expect(pipe.transform(SC2Map.LightshadeLE)).toEqual('Lightshade LE'); | ||
}); | ||
|
||
it('should return an empty string if the map is undefined', () => { | ||
expect(pipe.transform(undefined)).toEqual(''); | ||
}); | ||
}); |
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
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 |
---|---|---|
@@ -1,8 +1,43 @@ | ||
import { DayOfWeek } from '../../public_api'; | ||
import { WeekdayPipe } from './weekday.pipe'; | ||
|
||
|
||
describe('WeekdayPipe', () => { | ||
let pipe: WeekdayPipe; | ||
|
||
beforeEach(() => { | ||
pipe = new WeekdayPipe(); | ||
}); | ||
|
||
it('create an instance', () => { | ||
const pipe = new WeekdayPipe(); | ||
expect(pipe).toBeTruthy(); | ||
}); | ||
|
||
it('transforms DayOfWeek.Sunday to "Sundays"', () => { | ||
expect(pipe.transform(DayOfWeek.Sunday)).toBe('Sundays'); | ||
}); | ||
|
||
it('transforms DayOfWeek.Monday to "Mondays"', () => { | ||
expect(pipe.transform(DayOfWeek.Monday)).toBe('Mondays'); | ||
}); | ||
|
||
it('transforms DayOfWeek.Tuesday to "Tuesdays"', () => { | ||
expect(pipe.transform(DayOfWeek.Tuesday)).toBe('Tuesdays'); | ||
}); | ||
|
||
it('transforms DayOfWeek.Wednesday to "Wednesdays"', () => { | ||
expect(pipe.transform(DayOfWeek.Wednesday)).toBe('Wednesdays'); | ||
}); | ||
|
||
it('transforms DayOfWeek.Thursday to "Thursdays"', () => { | ||
expect(pipe.transform(DayOfWeek.Thursday)).toBe('Thursdays'); | ||
}); | ||
|
||
it('transforms DayOfWeek.Friday to "Fridays"', () => { | ||
expect(pipe.transform(DayOfWeek.Friday)).toBe('Fridays'); | ||
}); | ||
|
||
it('transforms DayOfWeek.Saturday to "Saturdays"', () => { | ||
expect(pipe.transform(DayOfWeek.Saturday)).toBe('Saturdays'); | ||
}); | ||
}); |
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
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
Oops, something went wrong.