seyfert/tests/cache.test.mts
Marcos Susaña 4dd69aeb14
ci(test): change to vitest (#275)
* ci(test): change to vitest

* fix: mts tests
2024-10-10 21:02:55 -04:00

52 lines
912 B
TypeScript

import { describe, test } from 'vitest';
import { Client, LimitedMemoryAdapter, MemoryAdapter } from '../lib/index';
// all intents
const intents = 53608447;
describe('test memory cache adapter', () => {
const adapter = new MemoryAdapter();
test('discord cache', () => {
const client = new Client({
getRC: () => ({
locations: {
base: '',
output: '',
},
intents,
token: '',
}),
});
client.setServices({
cache: {
adapter,
},
});
return client.cache.testAdapter();
});
});
describe('test limited memory cache adapter', () => {
const adapter = new LimitedMemoryAdapter();
test('discord cache', () => {
const client = new Client({
getRC: () => ({
locations: {
base: '',
output: '',
},
intents,
token: '',
}),
});
client.setServices({
cache: {
adapter,
},
});
return client.cache.testAdapter();
});
});