mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Presence, ChatModification, delay } from '../WAConnection/WAConnection'
|
||||
import {promises as fs} from 'fs'
|
||||
import { promises as fs } from 'fs'
|
||||
import * as assert from 'assert'
|
||||
import fetch from 'node-fetch'
|
||||
import { WAConnectionTest, testJid } from './Common'
|
||||
@@ -134,4 +134,11 @@ WAConnectionTest('Misc', (conn) => {
|
||||
await delay(1500)
|
||||
}
|
||||
})
|
||||
it('should generate link previews correctly', async () => {
|
||||
await conn.generateLinkPreview ('hello this is from https://www.github.com/adiwajshing/Baileys')
|
||||
// two links should fail
|
||||
await assert.rejects (
|
||||
conn.generateLinkPreview ('I sent links to https://teachyourselfcs.com/ and https://www.fast.ai/')
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user