Files
harbor-net/test/server/subscription.test.js

13 lines
433 B
JavaScript

import assert from 'node:assert/strict';
import test from 'node:test';
import { parseSubscriptionBody } from '../../src/server/subscription.js';
test('subscription server tags are trimmed for selection', () => {
const { servers } = parseSubscriptionBody(JSON.stringify({
outbounds: [{ type: 'vless', tag: 'de-frankfurt ', server: 'de.example', server_port: 443 }],
}));
assert.equal(servers[0].tag, 'de-frankfurt');
});