-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const Guilded = require('../src/index.js'); | ||
let client = new Guilded.Client("some token"); | ||
|
||
let message = new Guilded.Message(client.token, { | ||
"id": "H6G4Q", | ||
"createdBy": "y7Fqn", | ||
"content": "Hey, this is a cool message!", | ||
"channelId": "H7vG4", | ||
"serverId": "K8zv6", | ||
"mentions":{ | ||
"users":[ | ||
{ | ||
"id":"y7Fqn", | ||
} | ||
], | ||
"roles":[ | ||
{ | ||
"id":"H7vG4", | ||
} | ||
] | ||
}, | ||
"createdAt": "2020-10-10T20:20:20.000Z" | ||
}, client); | ||
|
||
test('Check if message is defined', () => { | ||
expect(message).toBeDefined(); | ||
}); | ||
|
||
test('Check if message is an instance of Message', () => { | ||
expect(message).toBeInstanceOf(Guilded.Message); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const Guilded = require('../src/index.js'); | ||
let client = new Guilded.Client("some token"); | ||
|
||
test('Check if client is defined', () => { | ||
expect(client).toBeDefined(); | ||
}); | ||
|
||
test('Check if client is an instance of Client', () => { | ||
expect(client).toBeInstanceOf(Guilded.Client); | ||
}); |