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

Dm/clean up test directories #145

Merged
merged 3 commits into from
May 14, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/v-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
"typescript": "^4.0.3"
},
"scripts": {
"test": "node_modules/.bin/mocha dist/**/*.test.js",
"test": "tsc -p ./test/tsconfig.json; node_modules/.bin/mocha test/dist/test/*.test.js",
"build": "tsc",
"build:watch": "tsc --watch",
"prepublish": "yarn build",
"pretest": "yarn build"
"pretest": "yarn build",
"clean": "rm -rf dist; rm -rf test/dist"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* =============================================================================
*/

import buffers from './testing/test-buffers'
import BufferList from './testing/buffer-list'
import { parse } from '.'
import buffers from './test-buffers'
import BufferList from './buffer-list'
import { parse } from '../src'
import assert from 'assert'
import { PassThrough } from 'stream'
import { BackendMessage } from './backend-messages'
import { BackendMessage } from '../src/backend-messages'

var authOkBuffer = buffers.authenticationOk()
var paramStatusBuffer = buffers.parameterStatus('client_encoding', 'UTF8')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

import assert from 'assert'
import { serialize } from './serializer'
import BufferList from './testing/buffer-list'
import { serialize } from '../src/serializer'
import BufferList from './buffer-list'

describe('serializer', () => {
/*it('builds startup message', function () {
Expand Down
27 changes: 27 additions & 0 deletions packages/v-protocol/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"target": "es6",
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"incremental": true,
"baseUrl": ".",
"declaration": true,
"paths": {
"*": [
"node_modules/*",
"src/types/*"
]
}
},
"include": [
"outbound-serializer.test.ts",
"inbound-parser.test.ts"
]
}

2 changes: 1 addition & 1 deletion packages/vertica-nodejs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ update-npm:
@npm i npm --global

bench:
@find benchmark -name "*-bench.js" | $(node-command)
@find test/benchmark -name "*bench.js" | $(node-command)

test-unit:
@printf "\n***TESTING VERTICA-NODEJS UNIT TESTS***\n\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const vertica = require('./lib')
const vertica = require('../../lib')

const params = {
text:
Expand Down Expand Up @@ -50,6 +50,9 @@ const bench = async (client, q, time) => {
}

const run = async () => {
console.log("Benchmarking currently does not work for vertica-nodejs and has not worked since being ported from node-postgres.")
console.log("In the future, consider fixing, or removing.")
/*
const client = new vertica.Client()
await client.connect()
console.log('start')
Expand Down Expand Up @@ -96,6 +99,7 @@ const run = async () => {

await client.end()
await client.end()
*/
}

run().catch((e) => console.error(e) || process.exit(-1))