Skip to content

Commit

Permalink
Support node v14
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed May 10, 2020
1 parent cffa382 commit 9396251
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_js:
- "8"
- "10"
- "12"
- "14"
- "node"

after_script: "npm run coveralls"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2019 Big Room Studios and project contributors
Copyright (c) 2016-2020 Big Room Studios and project contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
18 changes: 9 additions & 9 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ describe('Schwifty', () => {
const server = await getServer(getOptions());
let toredown = 0;

const origDestroy = server.knex().destroy;
server.knex().destroy = () => {
const origDestroy = server.knex().context.destroy;
server.knex().context.destroy = () => {

++toredown;
return origDestroy.call(server.knex());
Expand Down Expand Up @@ -152,8 +152,8 @@ describe('Schwifty', () => {

expect(srv.knex()).to.not.shallow.equal(server.knex());

const origDestroy = srv.knex().destroy;
srv.knex().destroy = () => {
const origDestroy = srv.knex().context.destroy;
srv.knex().context.destroy = () => {

++toredown;
return origDestroy.call(srv.knex());
Expand All @@ -170,8 +170,8 @@ describe('Schwifty', () => {
// Plugin 2 will use the root server's (referenced by server variable) knex connection
expect(srv.knex()).to.shallow.equal(server.knex());

const origDestroy = srv.knex().destroy;
srv.knex().destroy = () => {
const origDestroy = srv.knex().context.destroy;
srv.knex().context.destroy = () => {

++toredown;
return origDestroy.call(srv.knex());
Expand All @@ -192,8 +192,8 @@ describe('Schwifty', () => {
const server = await getServer(options);
let toredown = 0;

const origDestroy = server.knex().destroy;
server.knex().destroy = () => {
const origDestroy = server.knex().context.destroy;
server.knex().context.destroy = () => {

++toredown;
return origDestroy.call(server.knex());
Expand Down Expand Up @@ -698,7 +698,7 @@ describe('Schwifty', () => {

const failKnexWith = (knex, error) => {

knex.queryBuilder = () => ({
knex.context.queryBuilder = () => ({
select: () => {

throw error;
Expand Down

0 comments on commit 9396251

Please sign in to comment.