mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
52 lines
912 B
TypeScript
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();
|
|
});
|
|
});
|