Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Farias committed Dec 3, 2018
1 parent 143524d commit 6d34770
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
14 changes: 7 additions & 7 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"dist/neardb.umd.js": {
"bundled": 1421241,
"minified": 482549,
"gzipped": 130457
"bundled": 1421094,
"minified": 482483,
"gzipped": 130432
},
"dist/neardb.es.js": {
"bundled": 1260942,
"minified": 529383,
"gzipped": 137221,
"bundled": 1260807,
"minified": 529317,
"gzipped": 137197,
"treeshaked": {
"rollup": {
"code": 477370,
"import_statements": 0
},
"webpack": {
"code": 484330
"code": 484264
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neardb",
"version": "0.1.0",
"version": "0.1.1",
"description": "",
"keywords": [
"database",
Expand Down
3 changes: 0 additions & 3 deletions src/neardb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ export default class NearDB {
*/
async set(value: Payload): Promise<object> {
try {
if (typeof value !== 'object') {
throw new Error('Cannot set invalid value')
}
let docPath = documentPath(this.path)
let payload: Payload = await this.adapter.put(value, docPath)

Expand Down
20 changes: 10 additions & 10 deletions test/neardb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@ describe('.set', async () => {
expect(payload.ETag).toBeTruthy()
})

it('Cannot set invalid value', async () => {
expect.assertions(1)
// it('Cannot set invalid value', async () => {
// expect.assertions(1)

let value: any
value = 2
// let value: any
// value = 2

try {
await doc.set(value)
} catch (err) {
expect(err).toEqual(new Error('Cannot set invalid value'))
}
})
// try {
// await doc.set(value)
// } catch (err) {
// expect(err).toEqual(new Error('Cannot set invalid value'))
// }
// })

// it('Creates new indices for new document in collection', async () => {
// expect.assertions(1)
Expand Down

0 comments on commit 6d34770

Please sign in to comment.