-
Notifications
You must be signed in to change notification settings - Fork 34
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
275 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// url parser | ||
import urlParser from 'url-parse'; | ||
|
||
// setup | ||
import { setup, Context } from '../../setup'; | ||
|
||
import { QueryConfig } from '../../../lib/models/common/query.config'; | ||
import { ItemQueryConfig } from '../../../lib/models/item/item-query.config'; | ||
|
||
// tests | ||
describe('Query configurations', () => { | ||
|
||
var context = new Context(); | ||
setup(context); | ||
|
||
it(`QueryConfig should set values properly`, () => { | ||
var queryConfig = new QueryConfig({usePreviewMode: true, waitForLoadingNewContent: true}); | ||
expect(queryConfig.usePreviewMode).toEqual(true); | ||
expect(queryConfig.waitForLoadingNewContent).toEqual(true); | ||
|
||
var queryConfig = new QueryConfig({usePreviewMode: false, waitForLoadingNewContent: false}); | ||
expect(queryConfig.usePreviewMode).toEqual(false); | ||
expect(queryConfig.waitForLoadingNewContent).toEqual(false); | ||
}); | ||
|
||
it(`ItemQuerConfig should set values properly`, () => { | ||
var queryConfig = new ItemQueryConfig({usePreviewMode: true, waitForLoadingNewContent: true}); | ||
expect(queryConfig.usePreviewMode).toEqual(true); | ||
expect(queryConfig.waitForLoadingNewContent).toEqual(true); | ||
|
||
var queryConfig = new ItemQueryConfig({usePreviewMode: false, waitForLoadingNewContent: false}); | ||
expect(queryConfig.usePreviewMode).toEqual(false); | ||
expect(queryConfig.waitForLoadingNewContent).toEqual(false); | ||
}); | ||
|
||
}); | ||
|
Oops, something went wrong.