@cratis/arc.react 18.5.0 → 18.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/for_CommandScopeImplementation/FakeCommand.ts +25 -26
- package/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.ts +2 -2
- package/dist/cjs/commands/for_CommandScopeImplementation/FakeCommand.d.ts +23 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/FakeCommand.d.ts.map +1 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_executing_with_three_commands_were_two_having_changes.d.ts +2 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_executing_with_three_commands_were_two_having_changes.d.ts.map +1 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_none_of_the_added_commands_has_changes.d.ts +2 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_none_of_the_added_commands_has_changes.d.ts.map +1 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_one_of_the_added_commands_has_changes.d.ts +2 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_one_of_the_added_commands_has_changes.d.ts.map +1 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.d.ts +2 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.d.ts.map +1 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_reverting_with_three_commands_were_two_having_changes.d.ts +2 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_reverting_with_three_commands_were_two_having_changes.d.ts.map +1 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_there_are_no_commands.d.ts +2 -0
- package/dist/cjs/commands/for_CommandScopeImplementation/when_there_are_no_commands.d.ts.map +1 -0
- package/dist/cjs/commands/for_useCommand/FakeCommand.d.ts +17 -0
- package/dist/cjs/commands/for_useCommand/FakeCommand.d.ts.map +1 -0
- package/dist/cjs/commands/for_useCommand/when_creating_instance.d.ts +2 -0
- package/dist/cjs/commands/for_useCommand/when_creating_instance.d.ts.map +1 -0
- package/dist/cjs/commands/for_useCommand/when_creating_instance_with_initial_values.d.ts +2 -0
- package/dist/cjs/commands/for_useCommand/when_creating_instance_with_initial_values.d.ts.map +1 -0
- package/dist/cjs/commands/for_useCommand/when_creating_instance_without_optional_context_values.d.ts +2 -0
- package/dist/cjs/commands/for_useCommand/when_creating_instance_without_optional_context_values.d.ts.map +1 -0
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing_identity.d.ts +2 -0
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing_identity.d.ts.map +1 -0
- package/dist/cjs/queries/for_useObservableQuery/FakeObservableQuery.d.ts +19 -0
- package/dist/cjs/queries/for_useObservableQuery/FakeObservableQuery.d.ts.map +1 -0
- package/dist/cjs/queries/for_useObservableQuery/when_creating_instance.d.ts +2 -0
- package/dist/cjs/queries/for_useObservableQuery/when_creating_instance.d.ts.map +1 -0
- package/dist/cjs/queries/for_useQuery/FakeQuery.d.ts +14 -0
- package/dist/cjs/queries/for_useQuery/FakeQuery.d.ts.map +1 -0
- package/dist/cjs/queries/for_useQuery/when_creating_instance.d.ts +2 -0
- package/dist/cjs/queries/for_useQuery/when_creating_instance.d.ts.map +1 -0
- package/dist/cjs/queries/for_useQuery/when_creating_instance_with_sorting.d.ts +2 -0
- package/dist/cjs/queries/for_useQuery/when_creating_instance_with_sorting.d.ts.map +1 -0
- package/dist/cjs/queries/for_useQuery/when_creating_instance_without_optional_context_values.d.ts +2 -0
- package/dist/cjs/queries/for_useQuery/when_creating_instance_without_optional_context_values.d.ts.map +1 -0
- package/dist/cjs/queries/for_useQueryWithPaging/when_creating_instance_with_paging.d.ts +2 -0
- package/dist/cjs/queries/for_useQueryWithPaging/when_creating_instance_with_paging.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/FakeCommand.d.ts +23 -0
- package/dist/esm/commands/for_CommandScopeImplementation/FakeCommand.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/FakeCommand.js +49 -0
- package/dist/esm/commands/for_CommandScopeImplementation/FakeCommand.js.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_executing_with_three_commands_were_two_having_changes.d.ts +2 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_executing_with_three_commands_were_two_having_changes.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_executing_with_three_commands_were_two_having_changes.js +17 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_executing_with_three_commands_were_two_having_changes.js.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_none_of_the_added_commands_has_changes.d.ts +2 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_none_of_the_added_commands_has_changes.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_none_of_the_added_commands_has_changes.js +13 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_none_of_the_added_commands_has_changes.js.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_one_of_the_added_commands_has_changes.d.ts +2 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_one_of_the_added_commands_has_changes.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_one_of_the_added_commands_has_changes.js +13 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_one_of_the_added_commands_has_changes.js.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.d.ts +2 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.js +18 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_property_changes_on_added_command.js.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_reverting_with_three_commands_were_two_having_changes.d.ts +2 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_reverting_with_three_commands_were_two_having_changes.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_reverting_with_three_commands_were_two_having_changes.js +17 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_reverting_with_three_commands_were_two_having_changes.js.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_there_are_no_commands.d.ts +2 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_there_are_no_commands.d.ts.map +1 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_there_are_no_commands.js +6 -0
- package/dist/esm/commands/for_CommandScopeImplementation/when_there_are_no_commands.js.map +1 -0
- package/dist/esm/commands/for_useCommand/FakeCommand.d.ts +17 -0
- package/dist/esm/commands/for_useCommand/FakeCommand.d.ts.map +1 -0
- package/dist/esm/commands/for_useCommand/FakeCommand.js +18 -0
- package/dist/esm/commands/for_useCommand/FakeCommand.js.map +1 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance.d.ts +2 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance.d.ts.map +1 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance.js +28 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance.js.map +1 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_with_initial_values.d.ts +2 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_with_initial_values.d.ts.map +1 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_with_initial_values.js +24 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_with_initial_values.js.map +1 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_without_optional_context_values.d.ts +2 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_without_optional_context_values.d.ts.map +1 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_without_optional_context_values.js +24 -0
- package/dist/esm/commands/for_useCommand/when_creating_instance_without_optional_context_values.js.map +1 -0
- package/dist/esm/for_Bindings/given/bindings_context.d.ts +4 -0
- package/dist/esm/for_Bindings/given/bindings_context.d.ts.map +1 -0
- package/dist/esm/for_Bindings/given/bindings_context.js +5 -0
- package/dist/esm/for_Bindings/given/bindings_context.js.map +1 -0
- package/dist/esm/for_Bindings/when_initializing_bindings.d.ts +2 -0
- package/dist/esm/for_Bindings/when_initializing_bindings.d.ts.map +1 -0
- package/dist/esm/for_Bindings/when_initializing_bindings.js +24 -0
- package/dist/esm/for_Bindings/when_initializing_bindings.js.map +1 -0
- package/dist/esm/for_Bindings/when_initializing_bindings_without_optional_parameters.d.ts +2 -0
- package/dist/esm/for_Bindings/when_initializing_bindings_without_optional_parameters.d.ts.map +1 -0
- package/dist/esm/for_Bindings/when_initializing_bindings_without_optional_parameters.js +24 -0
- package/dist/esm/for_Bindings/when_initializing_bindings_without_optional_parameters.js.map +1 -0
- package/dist/esm/identity/for_IdentityProvider/when_refreshing_identity.d.ts +2 -0
- package/dist/esm/identity/for_IdentityProvider/when_refreshing_identity.d.ts.map +1 -0
- package/dist/esm/identity/for_IdentityProvider/when_refreshing_identity.js +47 -0
- package/dist/esm/identity/for_IdentityProvider/when_refreshing_identity.js.map +1 -0
- package/dist/esm/queries/for_useObservableQuery/FakeObservableQuery.d.ts +19 -0
- package/dist/esm/queries/for_useObservableQuery/FakeObservableQuery.d.ts.map +1 -0
- package/dist/esm/queries/for_useObservableQuery/FakeObservableQuery.js +25 -0
- package/dist/esm/queries/for_useObservableQuery/FakeObservableQuery.js.map +1 -0
- package/dist/esm/queries/for_useObservableQuery/when_creating_instance.d.ts +2 -0
- package/dist/esm/queries/for_useObservableQuery/when_creating_instance.d.ts.map +1 -0
- package/dist/esm/queries/for_useObservableQuery/when_creating_instance.js +66 -0
- package/dist/esm/queries/for_useObservableQuery/when_creating_instance.js.map +1 -0
- package/dist/esm/queries/for_useQuery/FakeQuery.d.ts +14 -0
- package/dist/esm/queries/for_useQuery/FakeQuery.d.ts.map +1 -0
- package/dist/esm/queries/for_useQuery/FakeQuery.js +13 -0
- package/dist/esm/queries/for_useQuery/FakeQuery.js.map +1 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance.d.ts +2 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance.d.ts.map +1 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance.js +48 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance.js.map +1 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_with_sorting.d.ts +2 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_with_sorting.d.ts.map +1 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_with_sorting.js +40 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_with_sorting.js.map +1 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_without_optional_context_values.d.ts +2 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_without_optional_context_values.d.ts.map +1 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_without_optional_context_values.js +44 -0
- package/dist/esm/queries/for_useQuery/when_creating_instance_without_optional_context_values.js.map +1 -0
- package/dist/esm/queries/for_useQueryWithPaging/when_creating_instance_with_paging.d.ts +2 -0
- package/dist/esm/queries/for_useQueryWithPaging/when_creating_instance_with_paging.d.ts.map +1 -0
- package/dist/esm/queries/for_useQueryWithPaging/when_creating_instance_with_paging.js +51 -0
- package/dist/esm/queries/for_useQueryWithPaging/when_creating_instance_with_paging.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/global.d.ts +11 -0
- package/identity/for_IdentityProvider/when_refreshing_identity.ts +4 -3
- package/package.json +2 -2
- package/queries/for_useObservableQuery/when_creating_instance.ts +2 -2
- package/queries/for_useQuery/when_creating_instance.ts +6 -2
- package/queries/for_useQuery/when_creating_instance_with_sorting.ts +6 -4
- package/queries/for_useQuery/when_creating_instance_without_optional_context_values.ts +6 -2
- package/queries/for_useQueryWithPaging/when_creating_instance_with_paging.ts +6 -2
package/dist/esm/queries/for_useQuery/when_creating_instance_without_optional_context_values.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { useQuery } from '../useQuery';
|
|
4
|
+
import { FakeQuery } from './FakeQuery';
|
|
5
|
+
import { ArcContext } from '../../ArcContext';
|
|
6
|
+
import { createFetchHelper } from '@cratis/arc/helpers/fetchHelper';
|
|
7
|
+
describe('when creating instance without optional context values', () => {
|
|
8
|
+
let fetchStub;
|
|
9
|
+
let fetchHelper;
|
|
10
|
+
let queryInstance = null;
|
|
11
|
+
const captureInstance = (instance) => {
|
|
12
|
+
queryInstance = instance;
|
|
13
|
+
};
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
fetchHelper = createFetchHelper();
|
|
16
|
+
fetchStub = fetchHelper.stubFetch();
|
|
17
|
+
fetchStub.resolves({
|
|
18
|
+
json: async () => ({ data: [], isSuccess: true, isAuthorized: true, isValid: true, hasExceptions: false, validationResults: [], exceptionMessages: [], exceptionStackTrace: '' })
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
afterEach(() => {
|
|
22
|
+
fetchHelper.restore();
|
|
23
|
+
});
|
|
24
|
+
const config = {
|
|
25
|
+
microservice: 'test-microservice'
|
|
26
|
+
};
|
|
27
|
+
class SpyQuery extends FakeQuery {
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
captureInstance(this);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
render(React.createElement(ArcContext.Provider, { value: config }, React.createElement(() => {
|
|
34
|
+
useQuery(SpyQuery);
|
|
35
|
+
return React.createElement('div', null, 'Test');
|
|
36
|
+
})));
|
|
37
|
+
it('should set api base path to empty string', () => (queryInstance._apiBasePath).should.equal(''));
|
|
38
|
+
it('should set origin to empty string', () => (queryInstance._origin).should.equal(''));
|
|
39
|
+
it('should set http headers callback to return empty object', () => {
|
|
40
|
+
const headers = queryInstance._httpHeadersCallback();
|
|
41
|
+
headers.should.deep.equal({});
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=when_creating_instance_without_optional_context_values.js.map
|
package/dist/esm/queries/for_useQuery/when_creating_instance_without_optional_context_values.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when_creating_instance_without_optional_context_values.js","sourceRoot":"","sources":["../../../../queries/for_useQuery/when_creating_instance_without_optional_context_values.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIpE,QAAQ,CAAC,wDAAwD,EAAE,GAAG,EAAE;IACpE,IAAI,SAA0B,CAAC;IAC/B,IAAI,WAAsE,CAAC;IAC3E,IAAI,aAAa,GAAqB,IAAI,CAAC;IAE3C,MAAM,eAAe,GAAG,CAAC,QAAmB,EAAE,EAAE;QAC5C,aAAa,GAAG,QAAQ,CAAC;IAC7B,CAAC,CAAC;IAEF,UAAU,CAAC,GAAG,EAAE;QACZ,WAAW,GAAG,iBAAiB,EAAE,CAAC;QAClC,SAAS,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;QACpC,SAAS,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE,CAAC;SACxK,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,WAAW,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAqB;QAC7B,YAAY,EAAE,mBAAmB;KACpC,CAAC;IAEF,MAAM,QAAS,SAAQ,SAAS;QAC5B;YACI,KAAK,EAAE,CAAC;YACR,eAAe,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;KACJ;IAED,MAAM,CACF,KAAK,CAAC,aAAa,CACf,UAAU,CAAC,QAAQ,EACnB,EAAE,KAAK,EAAE,MAAM,EAAE,EACjB,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE;QACrB,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC,CAAC,CACL,CACJ,CAAC;IAEF,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE,CAAC,CAAE,aAAqB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7G,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE,CAAC,CAAE,aAAqB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACjG,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QAC/D,MAAM,OAAO,GAAI,aAAqB,CAAC,oBAAoB,EAAE,CAAC;QAC9D,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when_creating_instance_with_paging.d.ts","sourceRoot":"","sources":["../../../../queries/for_useQueryWithPaging/when_creating_instance_with_paging.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { useQueryWithPaging } from '../useQuery';
|
|
4
|
+
import { FakeQuery } from '../for_useQuery/FakeQuery';
|
|
5
|
+
import { ArcContext } from '../../ArcContext';
|
|
6
|
+
import { Paging } from '@cratis/arc/queries';
|
|
7
|
+
import { createFetchHelper } from '@cratis/arc/helpers/fetchHelper';
|
|
8
|
+
describe('when creating instance with paging', () => {
|
|
9
|
+
let fetchStub;
|
|
10
|
+
let fetchHelper;
|
|
11
|
+
let queryInstance = null;
|
|
12
|
+
const captureInstance = (instance) => {
|
|
13
|
+
queryInstance = instance;
|
|
14
|
+
};
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fetchHelper = createFetchHelper();
|
|
17
|
+
fetchStub = fetchHelper.stubFetch();
|
|
18
|
+
fetchStub.resolves({
|
|
19
|
+
json: async () => ({ data: [], isSuccess: true, isAuthorized: true, isValid: true, hasExceptions: false, validationResults: [], exceptionMessages: [], exceptionStackTrace: '' })
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
afterEach(() => {
|
|
23
|
+
fetchHelper.restore();
|
|
24
|
+
});
|
|
25
|
+
const config = {
|
|
26
|
+
microservice: 'test-microservice',
|
|
27
|
+
apiBasePath: '/api',
|
|
28
|
+
origin: 'https://example.com',
|
|
29
|
+
httpHeadersCallback: () => ({ 'X-Custom-Header': 'custom-value' })
|
|
30
|
+
};
|
|
31
|
+
const paging = new Paging(1, 10);
|
|
32
|
+
class SpyQuery extends FakeQuery {
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
captureInstance(this);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
render(React.createElement(ArcContext.Provider, { value: config }, React.createElement(() => {
|
|
39
|
+
useQueryWithPaging(SpyQuery, paging);
|
|
40
|
+
return React.createElement('div', null, 'Test');
|
|
41
|
+
})));
|
|
42
|
+
it('should set paging on the query', () => queryInstance.paging.should.equal(paging));
|
|
43
|
+
it('should set microservice from context', () => (queryInstance._microservice).should.equal('test-microservice'));
|
|
44
|
+
it('should set api base path from context', () => (queryInstance._apiBasePath).should.equal('/api'));
|
|
45
|
+
it('should set origin from context', () => (queryInstance._origin).should.equal('https://example.com'));
|
|
46
|
+
it('should set http headers callback from context', () => {
|
|
47
|
+
const headers = queryInstance._httpHeadersCallback();
|
|
48
|
+
headers.should.deep.equal({ 'X-Custom-Header': 'custom-value' });
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=when_creating_instance_with_paging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when_creating_instance_with_paging.js","sourceRoot":"","sources":["../../../../queries/for_useQueryWithPaging/when_creating_instance_with_paging.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIpE,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAChD,IAAI,SAA0B,CAAC;IAC/B,IAAI,WAAsE,CAAC;IAC3E,IAAI,aAAa,GAAqB,IAAI,CAAC;IAE3C,MAAM,eAAe,GAAG,CAAC,QAAmB,EAAE,EAAE;QAC5C,aAAa,GAAG,QAAQ,CAAC;IAC7B,CAAC,CAAC;IAEF,UAAU,CAAC,GAAG,EAAE;QACZ,WAAW,GAAG,iBAAiB,EAAE,CAAC;QAClC,SAAS,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;QACpC,SAAS,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS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