Skip to content

Commit

Permalink
add lint
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshdasa12345 committed Dec 17, 2024
1 parent 30a9be4 commit a832347
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
32 changes: 16 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ ignore_ghpages: &ignore_ghpages
- gh-pages

jobs:
# lint:
# machine:
# image: ubuntu-2004:2024.01.1
# docker_layer_caching: false
# parallelism: 1
# resource_class: large
# steps:
# - checkout
# - run_make:
# label: Run linter
# target: lint
# - store_test_results:
# path: reports
# - store_artifacts:
# path: reports
lint:
machine:
image: ubuntu-2004:2024.01.1
docker_layer_caching: false
parallelism: 1
resource_class: large
steps:
- checkout
- run_make:
label: Run linter
target: lint
- store_test_results:
path: reports
- store_artifacts:
path: reports

unit_tests:
machine:
Expand Down Expand Up @@ -227,7 +227,7 @@ workflows:
version: 2
datahub:
jobs:
# - lint: *ignore_ghpages
- lint: *ignore_ghpages
- unit_tests: *ignore_ghpages
- unit_client_tests: *ignore_ghpages
- functional_tests: *ignore_ghpages
Expand Down
22 changes: 0 additions & 22 deletions test/unit-client/assets/javascripts/lib/xhr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,10 @@ describe('XHR', () => {
expect(history.location.search).to.equal('?a=1&b=2')
})
it('should not call history.push if params are not provided', () => {
const history = createMemoryHistory();
const res = { data: {} }
const params = {}

console.log('Initial history.location.search:', history.location.search);
const historyPushSpy = sinon.spy(history, 'push');

XHR.updateOutlet(res, params)

console.log('Params provided to XHR.updateOutlet:', params);
console.log('History location after updateOutlet:', history.location);

// if (historyPushSpy.called) {
// console.log('history.push was called with:', historyPushSpy.args);
// } else {
// console.log('history.push was NOT called');
// }

console.log('Final history.location.search:', history.location.search);

// expect(historyPushSpy).not.to.have.been.called;
expect(history.location.search).to.equal('')
// console.log('Final history.location.search:', history.location.search);

// historyPushSpy.restore();
})
it('should perform page load if unable to pushState', () => {
sinon.stub(history, 'replace').throws('error')
const testWindow = {
Expand Down

0 comments on commit a832347

Please sign in to comment.