-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bug] Check for valid layer pinned prop before performing comparison (#…
…1297) * [Bug] Check for valid layer pinned prop before performing comparison Signed-off-by: Giuseppe Macri <macri.giuseppe@gmail.com>
- Loading branch information
1 parent
42acc1c
commit 3f0f7a6
Showing
3 changed files
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import test from 'tape'; | ||
import {isValidMapInfo} from 'utils/map-info-utils'; | ||
|
||
test('mapInfoUtils -> isValidMapInfo', t => { | ||
t.equal( | ||
isValidMapInfo({title: 'example', description: ''}), | ||
true, | ||
'Should validate map info with no description' | ||
); | ||
t.equal( | ||
isValidMapInfo({title: 'example', description: 'this is a map'}), | ||
true, | ||
'Should validate map info with description' | ||
); | ||
t.equal( | ||
isValidMapInfo({ | ||
title: | ||
'this is a really long title for a map that is not going to work because i really do not like this kind of long title', | ||
description: 'this is a map' | ||
}), | ||
false, | ||
'Should validate map with a really long title' | ||
); | ||
t.equal( | ||
isValidMapInfo({ | ||
description: | ||
'this is a really long description for a map that is not going to work because i really do not like this kind of long title', | ||
title: 'this is a map' | ||
}), | ||
false, | ||
'Should validate map with a really long description' | ||
); | ||
t.end(); | ||
}); |