Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothée Rebours committed Feb 2, 2024
1 parent f906b00 commit 7c3e6ab
Show file tree
Hide file tree
Showing 15 changed files with 2,055 additions and 1,635 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ browser-version/node_modules
test-results
typings-tests.js
cjs/*
dist/*
1 change: 1 addition & 0 deletions __mocks__/@react-native-async-storage/async-storage.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports.default = require('@react-native-async-storage/async-storage/jest/async-storage-mock')
3 changes: 0 additions & 3 deletions __mocks__/@react-native-async-storage/async-storage.js

This file was deleted.

6 changes: 2 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@

/// <reference types="node" />

import { EventEmitter } from "events";

export default Nedb;

export type Document<Schema> = Schema & {
_id: string;
};

declare class Nedb<Schema = Record<string, any>> extends EventEmitter {
constructor(pathOrOptions?: string | Nedb.DataStoreOptions);
declare class Nedb<Schema = Record<string, any>> {
constructor(pathOrOptions?: Nedb.DataStoreOptions);

persistence: Nedb.Persistence;

Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
resolver: '<rootDir>/test/react-native/resolver.cjs',
testEnvironment: 'node',
testMatch: [ '**/*.test.cjs' ]
}
4 changes: 2 additions & 2 deletions karma.conf.local.js → karma.conf.local.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

import template from './karma.conf.template.js'
const template = require('./karma.conf.template.cjs')

export default function (config) {
module.exports = function (config) {
const localBrowser = {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
Expand Down
6 changes: 3 additions & 3 deletions karma.conf.template.js → karma.conf.template.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

export default (config) => ({
module.exports = (config) => ({
// Increase timeout in case connection in CI is slow
captureTimeout: 120000,
browserNoActivityTimeout: 300000,
Expand All @@ -14,8 +14,8 @@ export default (config) => ({
// list of files / patterns to load in the browser
files: [
'node_modules/localforage/dist/localforage.min.js',
'testutils.min.js',
'nedb.min.js',
'dist/testutils.min.js',
'dist/nedb.min.js',
'test/browser/nedb-browser.spec.js',
'test/browser/load.spec.js'
],
Expand Down
Loading

0 comments on commit 7c3e6ab

Please sign in to comment.