Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #85

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
@@ -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
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
@@ -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
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
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