generated from array-in-a-matrix/matrix-bot-template
15 lines
392 B
Nim
15 lines
392 B
Nim
import unittest
|
|
import jsconsole
|
|
|
|
import nimbotsdk
|
|
test "can login using username and password":
|
|
# TODO: import account credentials from a .gitignore'd config file
|
|
const
|
|
homeserver: cstring = ""
|
|
username: cstring = ""
|
|
password: cstring = ""
|
|
|
|
let auth = newMatrixAuth(homeserver)
|
|
let client = auth.passwordLogin(username, password)
|
|
|
|
console.log(client.accessToken)
|