Skip to content

Tests failing on janet 1.32.1-df2d5cb3 #9

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 1 commit 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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ db supports two databases
Run this command to create a sqlite database in the current directory

```sh
db create database:sqlite todos_dev.sqlite3
db new database:sqlite todos_dev.sqlite3
```

`todos_dev.sqlite3` can be any name
Expand All @@ -56,7 +56,7 @@ db create database:sqlite todos_dev.sqlite3
Run this command to create a postgres database, assuming a running postgres server and a `createdb` cli script in the current `PATH`

```sh
db create database:postgres todos_dev
db new database:postgres todos_dev
```

## Migrations
Expand All @@ -66,7 +66,7 @@ Creating migrations happens with the same cli program which should get installed
Note: Make sure you have the janet module `bin` folder in your `PATH`.

```sh
db create migration 'create-table-todos'
db new migration 'create-table-todos'
```

This should create a new folder in your current directory named `db/migrations` and in that folder, there should be an empty `.sql` file named `<long-number>-create-table-todos.sql`:
Expand All @@ -79,7 +79,7 @@ This should create a new folder in your current directory named `db/migrations`
We can do a little better than that though:

```sh
db create table 'todos' 'name text not null' 'completed-at datetime'
db new table 'todos' 'name text not null' 'completed-at datetime'
```

This should create a new sql file that looks like this:
Expand Down
4 changes: 2 additions & 2 deletions test/db/pg/db-test.janet
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(import tester :prefix "" :exit true)

(if (string/has-prefix? "postgres" (or (os/getenv "DATABASE_URL") ""))
(import "src/db/pg/db" :as db)
(import "src/db/sqlite/db" :as db))
(import /src/db/pg/db :as db)
(import /src/db/sqlite/db :as db))


(when (string/has-prefix? "postgres" (or (os/getenv "DATABASE_URL") ""))
Expand Down
4 changes: 2 additions & 2 deletions test/db/sqlite/db-test.janet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(import tester :prefix "" :exit true)
(import "src/db/sqlite/db" :as db)
(import "src/db/helper" :prefix "")
(import /src/db/sqlite/db :as db)
(import /src/db/helper :prefix "")

(db/connect "test.sqlite3")

Expand Down
2 changes: 1 addition & 1 deletion test/db/sqlite/sql-test.janet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(import tester :prefix "" :exit true)
(import "src/db/sqlite/sql" :as sql)
(import /src/db/sqlite/sql :as sql)

(deftest
(test "from"
Expand Down