This repository has been archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(EntityUid): Replaced
instanceof EntityUid
, fix deprecations in …
…tests Replaced `value instanceof EntityUid` by `EntityUid.isEntityUid(value)` for compatibility. `instanceof` implementation did not worked as expected, returning false negative. Changed `Diaspora.createDataSource` with `Diaspora.createNamedDataSource` in tests.
- Loading branch information
Gerkin
committed
Dec 1, 2018
1 parent
a7a9d4f
commit 8b3f720
Showing
6 changed files
with
46 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"starttime": "9/16/2018, 7:56:26 PM", | ||
"totaltimesec": 169177, | ||
"lasttime": "11/30/2018, 11:36:55 PM" | ||
"totaltimesec": 172748, | ||
"lasttime": "12/1/2018, 11:46:44 PM" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,16 @@ | ||
import { Adapter } from '../../../src/adapters'; | ||
|
||
describe( 'instanceof EntityUid', () => { | ||
it( 'OK Non empty string', () => { | ||
expect( Adapter.EntityUid.isEntityUid( 'foo' ) ).toBe( true ); | ||
expect( Adapter.EntityUid.isEntityUid( '' ) ).toBe( false ); | ||
} ); | ||
it( 'OK Non 0 integer', () => { | ||
expect( Adapter.EntityUid.isEntityUid( 42 ) ).toBe( true ); | ||
expect( Adapter.EntityUid.isEntityUid( 0 ) ).toBe( false ); | ||
} ); | ||
it( 'Objects should not match', () => { | ||
expect( Adapter.EntityUid.isEntityUid( {} ) ).toBe( false ); | ||
expect( Adapter.EntityUid.isEntityUid( [] ) ).toBe( false ); | ||
} ); | ||
} ); |
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