Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
20207784
Unverified
Commit
20207784
authored
Dec 05, 2018
by
Kewde
Committed by
GitHub
Dec 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add open / close for sharedcache database
parent
a5fbefd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
open_close.test.js
test/open_close.test.js
+23
-0
No files found.
test/open_close.test.js
View file @
20207784
...
@@ -30,6 +30,29 @@ describe('open/close', function() {
...
@@ -30,6 +30,29 @@ describe('open/close', function() {
helper
.
deleteFile
(
'test/tmp/test_create.db'
);
helper
.
deleteFile
(
'test/tmp/test_create.db'
);
});
});
});
});
describe
(
'open and close non-existant shared database'
,
function
()
{
before
(
function
()
{
helper
.
deleteFile
(
'test/tmp/test_create_shared.db'
);
});
var
db
;
it
(
'should open the database'
,
function
(
done
)
{
db
=
new
sqlite3
.
Database
(
'test/tmp/test_create_shared.db'
,
sqlite3
.
OPEN_SHAREDCACHE
|
sqlite3
.
SQLITE_OPEN_MEMORY
,
done
);
});
it
(
'should close the database'
,
function
(
done
)
{
db
.
close
(
done
);
});
it
(
'should have created the file'
,
function
()
{
assert
.
fileExists
(
'test/tmp/test_create_shared.db'
);
});
after
(
function
()
{
helper
.
deleteFile
(
'test/tmp/test_create_shared.db'
);
});
});
it
(
'should not be unable to open an inaccessible database'
,
function
(
done
)
{
it
(
'should not be unable to open an inaccessible database'
,
function
(
done
)
{
// NOTE: test assumes that the user is not allowed to create new files
// NOTE: test assumes that the user is not allowed to create new files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment