-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-core.js
More file actions
39 lines (29 loc) · 950 Bytes
/
Copy pathtest-core.js
File metadata and controls
39 lines (29 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Simple test to verify @sero/core is working
import { sero } from './packages/core/dist/index.js';
console.log('Testing @sero/core...');
// Test basic configuration
sero.configure({
delayMs: 100,
viewTransitions: true,
respectReducedMotion: true,
timeoutMs: 1000
});
console.log('✅ Configuration successful');
// Test subscription
const unsubscribe = sero.subscribe((context) => {
console.log('📡 Transition event:', context.phase);
});
console.log('✅ Subscription successful');
// Test setPaths
sero.setPaths('/home', '/about');
console.log('✅ setPaths successful');
// Test state
const state = sero.getState();
console.log('📊 Current state:', state);
// Test notifyExternalNavigation
sero.notifyExternalNavigation();
console.log('✅ notifyExternalNavigation successful');
// Clean up
unsubscribe();
console.log('✅ Unsubscribe successful');
console.log('🎉 All tests passed! @sero/core is working correctly.');