LeoYuan 袁力皓 503793fdfc
fix: supportVariable SHOULD take precedence over supportVariableGlobally (#1997)
* fix: supportVariable should take precedence over supportVariableGlobally
2023-05-29 10:12:42 +08:00

9 lines
411 B
TypeScript

import { shouldUseVariableSetter } from '../../src/misc';
it('shouldUseVariableSetter', () => {
expect(shouldUseVariableSetter(false, true)).toBeFalsy();
expect(shouldUseVariableSetter(true, true)).toBeTruthy();
expect(shouldUseVariableSetter(true, false)).toBeTruthy();
expect(shouldUseVariableSetter(undefined, false)).toBeFalsy();
expect(shouldUseVariableSetter(undefined, true)).toBeTruthy();
});