Skip to content

the test with persistant db level instead of level-mem does not pass #77

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ docs
.DS_Store
coverage/
package-lock.json
yourtestdb
1 change: 1 addition & 0 deletions .nyc_output/16378e4b-44d8-4ed2-b540-c8c89ead60dc.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .nyc_output/f6654ff2-3302-4b07-8a28-508241ae4bef.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"f6654ff2-3302-4b07-8a28-508241ae4bef","pid":81932,"argv":["/home/smag/.nvm/versions/node/v18.16.0/bin/node","/home/smag/dev/levelgraph-jsonld/node_modules/.bin/mocha","--recursive","test"],"execArgv":[],"cwd":"/home/smag/dev/levelgraph-jsonld","time":1687498624146,"ppid":81931,"coverageFilename":"/home/smag/dev/levelgraph-jsonld/.nyc_output/16378e4b-44d8-4ed2-b540-c8c89ead60dc.json","externalId":"","uuid":"16378e4b-44d8-4ed2-b540-c8c89ead60dc","files":["/home/smag/dev/levelgraph-jsonld/index.js"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":null,"pid":81920,"argv":["/home/smag/.nvm/versions/node/v18.16.0/bin/node","/home/smag/.nvm/versions/node/v18.16.0/bin/npm","run","test"],"execArgv":[],"cwd":"/home/smag/dev/levelgraph-jsonld","time":1687498623837,"ppid":81908,"coverageFilename":"/home/smag/dev/levelgraph-jsonld/.nyc_output/f6654ff2-3302-4b07-8a28-508241ae4bef.json","externalId":"","uuid":"f6654ff2-3302-4b07-8a28-508241ae4bef","files":[]}
1 change: 1 addition & 0 deletions .nyc_output/processinfo/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"processes":{"16378e4b-44d8-4ed2-b540-c8c89ead60dc":{"parent":"f6654ff2-3302-4b07-8a28-508241ae4bef","children":[]},"f6654ff2-3302-4b07-8a28-508241ae4bef":{"parent":null,"children":["16378e4b-44d8-4ed2-b540-c8c89ead60dc"]}},"files":{"/home/smag/dev/levelgraph-jsonld/index.js":["16378e4b-44d8-4ed2-b540-c8c89ead60dc"]},"externalIds":{}}
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@


### 2.0.1
- try to fix the issue https://github.com/levelgraph/levelgraph-jsonld/pull/77
- upgrade outdated dependencies
- remove deprecated istanbul & zul dev-dep, and test using it,
- add a basic levl test with tape
- write test wite tape



<a name="0.4.0"></a>
## 0.4.0 (2014-11-24)

Expand All @@ -9,4 +20,3 @@

If you need a script to migrate your data please [create new
issue](https://github.com/mcollina/levelgraph-jsonld/issues)

1 change: 1 addition & 0 deletions db/2f84b0db-2ea6-4dae-bf50-81d557f4fa82/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions db/2f84b0db-2ea6-4dae-bf50-81d557f4fa82/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023/06/23-07:55:50.069487 7fe5e3fff640 Delete type=3 #1
Binary file not shown.
1 change: 1 addition & 0 deletions db/7b82fced-b2ee-4504-91df-210b19350563/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions db/7b82fced-b2ee-4504-91df-210b19350563/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023/06/23-07:49:27.466188 7fcc3e3fd640 Delete type=3 #1
Binary file not shown.
1 change: 1 addition & 0 deletions db/a3f69be2-07c9-4d56-98ce-056680be2ebd/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions db/a3f69be2-07c9-4d56-98ce-056680be2ebd/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023/06/23-07:48:25.112108 7f25a37fe640 Delete type=3 #1
Binary file not shown.
1 change: 1 addition & 0 deletions db/d5a9226e-243e-455d-95b9-fd88cd919c6f/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions db/d5a9226e-243e-455d-95b9-fd88cd919c6f/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023/06/23-07:55:50.061992 7fe5f11fe640 Delete type=3 #1
Binary file not shown.
32 changes: 14 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"name": "levelgraph-jsonld",
"version": "2.0.0",
"version": "2.0.1",
"description": "The Object Document Mapper for LevelGraph based on JSON-LD",
"main": "index.js",
"scripts": {
"test": "./node_modules/.bin/mocha --recursive test",
"zuul": "zuul -- test",
"zuul-local": "zuul --local -- test/*.js",
"coverage": "rm -rf coverage; istanbul cover _mocha -- --recursive --reporter spec --bail",
"publish-coverage": "cat coverage/lcov.info | coveralls"
"test": "rm -rf yourtestdb; ./node_modules/.bin/mocha --recursive test"
},
"repository": {
"type": "git",
Expand All @@ -33,24 +29,24 @@
"author": "Matteo Collina <[email protected]>",
"license": "MIT",
"dependencies": {
"async": "^2.1.4",
"jsonld": "0.4.9",
"n3": "^0.10.0",
"uuid": "^3.0.1"
"async": "^3.2.4",
"jsonld": "^8.2.0",
"n3": "^1.16.4",
"uuid": "^9.0.0"
},
"peerDependencies": {
"levelgraph": "^3.0.0"
},
"devDependencies": {
"browserify": "^14.0.0",
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"istanbul": "^0.4.2",
"browserify": "^17.0.0",
"chai": "^4.3.7",
"coveralls": "^3.1.1",
"level": "^8.0.0",
"level-mem": "^6.0.1",
"levelgraph": "^3.0.0",
"lodash": "^4.17.4",
"mocha": "^4.1.0",
"uglify-js": "^3.0.0",
"zuul": "^3.11.1"
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"tape": "^5.6.3",
"uglify-js": "^3.17.4"
}
}
131 changes: 0 additions & 131 deletions test/cut_spec.js

This file was deleted.

15 changes: 15 additions & 0 deletions test/level.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// https://github.com/Level/level/blob/master/test.js
'use strict'

const test = require('tape')
const { v4: uuid } = require('uuid')
const { Level } = require('level')

// Because we directly export classic-level or browser-level
// without wrapping them, there's no need for further tests here.
test('smoke test', async function (t) {
const db = new Level('db/' + uuid())
await db.put('abc', '123')
t.is(await db.get('abc'), '123')
return db.close()
})
Loading