Skip to content

Commit

Permalink
feat: Testing files
Browse files Browse the repository at this point in the history
  • Loading branch information
MDCYT committed Oct 2, 2022
1 parent a2d353e commit 382b9a2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/client.test.js
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);
});
10 changes: 10 additions & 0 deletions test/example.test.js
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);
});

0 comments on commit 382b9a2

Please sign in to comment.