Skip to content

Commit

Permalink
Merge pull request #85 from NYULibraries/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
da70 authored Mar 13, 2024
2 parents 9ca54cd + 69c39d0 commit cd90d48
Show file tree
Hide file tree
Showing 6 changed files with 2,732 additions and 2,108 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12-alpine
FROM node:14-alpine

ENV INSTALL_PATH /app
ENV PATH $INSTALL_PATH/node_modules/.bin:$PATH
Expand All @@ -11,4 +11,4 @@ ADD . $INSTALL_PATH

WORKDIR $INSTALL_PATH

CMD NODE_ENV=production yarn build:prod
CMD NODE_ENV=production yarn build:prod
6 changes: 3 additions & 3 deletions js/test/App.vue/shallowRender.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ describe('shallow render', () => {
});

describe('when second tab selected', () => {
beforeEach(() => {
wrapper.setData({
beforeEach(async () => {
await wrapper.setData({
selectedTab: 2,
});
});
Expand Down Expand Up @@ -183,4 +183,4 @@ describe('shallow render', () => {
});
});
});
});
});
4 changes: 2 additions & 2 deletions js/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/nyulibraries/chromium_headless_node:12-chromium_latest
FROM quay.io/nyulibraries/chromium_headless_node:14-chromium_latest

ENV INSTALL_PATH /app
ENV PATH $INSTALL_PATH/node_modules/.bin:$PATH
Expand All @@ -23,4 +23,4 @@ WORKDIR $INSTALL_PATH
COPY . .

# Autorun chrome headless with no GPU
# ENTRYPOINT ["chromium-browser", "--headless", "--disable-gpu", "--disable-software-rasterizer", "--disable-dev-shm-usage"]
# ENTRYPOINT ["chromium-browser", "--headless", "--disable-gpu", "--disable-software-rasterizer", "--disable-dev-shm-usage"]
18 changes: 9 additions & 9 deletions js/test/components/SearchForm.vue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ describe('SearchForm', () => {
expect(wrapper.vm.engineType).toBe(propsData.engine.type);
});

it(`is undefined if engine is undefined`, () => {
wrapper.setProps({ engine: undefined });
it(`is undefined if engine is undefined`, async () => {
await wrapper.setProps({ engine: undefined });
expect(wrapper.vm.engineType).toBe(undefined);
});
});

describe(`searchFunction`, () => {
it(`is properly mapped to engines`, () => {
it(`is properly mapped to engines`, async () => {
expect(wrapper.vm.searchFunction).toBe(primoSearch);
wrapper.setProps({ engine: { type: 'guides' } });
await wrapper.setProps({ engine: { type: 'guides' } });
expect(wrapper.vm.searchFunction).toBe(guidesSearch);
});
});
Expand All @@ -56,19 +56,19 @@ describe('SearchForm', () => {
it(`has appropriate label for 'primo' engine`, () => {
expect(wrapper.vm.inputAriaLabel).toBe(`Search Bobcat`);
});
it(`has appropriate label for 'guides' engine`, () => {
wrapper.setProps({ engine: { type: 'guides' } });
it(`has appropriate label for 'guides' engine`, async () => {
await wrapper.setProps({ engine: { type: 'guides' } });
expect(wrapper.vm.inputAriaLabel).toBe(`Search for subject guides`);
});
});
});

describe(`shallow render`, () => {
it('renders <search-redirect-form> if primo or guides engine', () => {
it('renders <search-redirect-form> if primo or guides engine', async () => {
expect(wrapper.contains('search-redirect-form-stub')).toBe(true);
wrapper.setProps({ engine: { type: 'guides' } });
await wrapper.setProps({ engine: { type: 'guides' } });
expect(wrapper.contains('search-redirect-form-stub')).toBe(true);
expect(wrapper.contains('getit-search-form-stub')).toBe(false);
});
});
});
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"name": "bess-vue",
"description": "Embed a JS search form to your Primo (new) UI in any webpage.",
"dependencies": {
"minimist": "^0.2.1",
"vue": "^2.6"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.0.0",
"@babel/runtime": "^7.3.1",
"@vue/test-utils": "^1.0.0-beta.28",
"@vue/test-utils": "v1.3.6",
"babel-eslint": "^8.2.3",
"babel-loader": "^8.0.0",
"core-js": "3",
Expand Down Expand Up @@ -46,7 +47,7 @@
"test:chrome-debugger": "karma start --browsers=Chrome --single-run=false --debug"
},
"engines": {
"node": "8 || 10 || 12"
"node": "14"
},
"resolutions": {
"kind-of": "^6.0.3",
Expand Down
Loading

0 comments on commit cd90d48

Please sign in to comment.