Gate record features and storage entry points with invitation guidance; enforce record access in the backend. Add homepage greetings, right-swipe profile dismissal, and move the smoking switch to settings. Simplify API base configuration and remove the unused legacy tab bar component.
16 lines
854 B
JavaScript
16 lines
854 B
JavaScript
const test = require('node:test');
|
|
const assert = require('node:assert/strict');
|
|
const path = require('node:path');
|
|
const loader = require('./load-module.cjs');
|
|
test('requests and file previews use the manually configured API base in every runtime', () => {
|
|
for (const version of ['develop','trial','release']) {
|
|
const wx = {getAccountInfoSync:()=>({miniProgram:{envVersion:version}})};
|
|
const load = loader({wx,console});
|
|
const configured = load(path.join(__dirname,'../config/env.js'));
|
|
const {API_BASE,getImageUrl} = load(path.join(__dirname,'../utils/request.js'));
|
|
assert.deepEqual(Object.keys(configured),['API_BASE']);
|
|
assert.equal(API_BASE,require('../config/env').API_BASE);
|
|
assert.equal(getImageUrl('/api/files/6083e119-6b26-441b-8b70-44d224366238'),API_BASE+'/files/6083e119-6b26-441b-8b70-44d224366238');
|
|
}
|
|
});
|