Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wyselib

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wyselib - npm Package Compare versions

Comparing version 1.0.20 to 1.0.21

5

package.json
{
"name": "wyselib",
"version": "1.0.20",
"version": "1.0.21",
"description": "WyattERP Schema Library",

@@ -31,3 +31,6 @@ "main": "lib/index.js",

"mocha": "^9.1.3"
},
"dependencies": {
"wyseman": "^1.1.2"
}
}

27

test/schema.js

@@ -12,3 +12,3 @@ //Build test database schema; Run first

const dbConfig = {database: TestDB, user: DBAdmin, connect: true}
const SchemaList = "'{wylib,base}'"
const SchemaList = "'wylib','base'"
var log = Log('test-schema')

@@ -20,11 +20,12 @@

before('Delete sample database if it exists', function(done) {
Child.exec(`dropdb --if-exists -U ${DBAdmin} ${TestDB}`, (err, out) => done())
Child.exec(`dropdb --if-exists -U ${DBAdmin} ${TestDB}`, (e) => done(e))
})
before('Build schema database', function(done) {
Child.exec("wyseman objects text defs init", {cwd: __dirname}, (e,o) => {if (e) done(e); done()})
this.timeout(4000) //Build may be a little slow
Child.exec("wyseman objects text defs init", {cwd: __dirname}, (e) => {done(e)})
})
before('Connect to schema database', function(done) {
db = new DbClient(dbConfig, ()=>{}, ()=>{
db = new DbClient(dbConfig, null, ()=>{
log.debug("Connected to DB");

@@ -35,6 +36,6 @@ done()

it('should have 9 wyseman tables built', function(done) {
it('Should have 9 wyseman tables built', function(done) {
let sql = "select * from pg_tables where schemaname = 'wm'"
db.query(sql, null, (e, res) => {if (e) done(e)
log.debug("Tables:", res.rows)
//log.debug("Tables:", res.rows)
assert.equal(res.rows.length, 9)

@@ -45,3 +46,3 @@ done()

it('should have 13 wyselib tables built', function(done) {
it('Should have 13 wyselib tables built', function(done) {
let sql = "select * from pg_tables where schemaname = 'base'"

@@ -54,6 +55,6 @@ db.query(sql, null, (e, res) => {if (e) done(e)

it('should have expected wyselib column text descriptions', function(done) {
it('Should have expected wyselib column text descriptions', function(done) {
let sql = "select * from wm.column_text where ct_sch = 'base'"
db.query(sql, null, (e, res) => {if (e) done(e)
assert.equal(res.rows.length, 176)
assert.equal(res.rows.length, 172)
done()

@@ -80,4 +81,6 @@ })

it('check for undocumented tables', function(done) {
let sql = `select sch,tab from wm.table_lang where language = 'en' and help is null and sch in (${SchemaList}) order by 1,2`
let sql = `select sch,tab from wm.table_lang where help is null and sch in (${SchemaList}) order by 1,2`
//log.debug("Sql:", sql)
db.query(sql, (e, res) => {if (e) done(e)
//log.debug("res:", res.rows ? JSON.stringify(res.rows) : null)
assert.equal(res.rows.length, 0)

@@ -89,4 +92,6 @@ done()

it('check for undocumented columns', function(done) {
let sql = `select sch,tab,col from wm.column_lang where language = 'en' and help is null and sch in (${SchemaList}) order by 1,2`
let sql = `select sch,tab,col from wm.column_lang where help is null and sch in (${SchemaList}) order by 1,2`
//log.debug("Sql:", sql)
db.query(sql, (e, res) => {if (e) done(e)
//log.debug("res:", res)
assert.equal(res.rows.length, 0)

@@ -93,0 +98,0 @@ done()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc