15 lines
511 B
JavaScript
15 lines
511 B
JavaScript
import { shouldKeepTaskProjectLocal } from './smartPackageTaskSave';
|
|
|
|
describe('shouldKeepTaskProjectLocal', () => {
|
|
test('keeps a task project-local when its catalog package was deactivated', () => {
|
|
expect(shouldKeepTaskProjectLocal(404, {
|
|
code: 'SMART_PACKAGE_NOT_FOUND',
|
|
error: 'Package not found or inactive'
|
|
})).toBe(true);
|
|
});
|
|
|
|
test('does not hide unrelated save failures', () => {
|
|
expect(shouldKeepTaskProjectLocal(500, { error: 'Database error' })).toBe(false);
|
|
});
|
|
});
|