@@ -57,30 +57,30 @@ describe('helper', () => {
57
57
it ( 'returns the expected value' , ( ) => {
58
58
const room = 'room' ;
59
59
const docid = 'docid' ;
60
- const prefix = 'prefix ' ;
60
+ const prefix = 'y ' ;
61
61
62
62
const result = computeRedisRoomStreamName ( room , docid , prefix ) ;
63
63
64
- expect ( result ) . toBe ( 'prefix :room:room:docid' ) ;
64
+ expect ( result ) . toBe ( 'y :room:room:docid' ) ;
65
65
} ) ;
66
66
} ) ;
67
67
68
68
describe ( 'decodeRedisRoomStreamName' , ( ) => {
69
69
describe ( 'when the rediskey is malformed' , ( ) => {
70
70
it ( 'throws an error' , ( ) => {
71
71
const rediskey = 'invalid' ;
72
- const expectedPrefix = 'prefix ' ;
72
+ const expectedPrefix = 'y ' ;
73
73
74
74
expect ( ( ) => decodeRedisRoomStreamName ( rediskey , expectedPrefix ) ) . toThrow (
75
- `Malformed stream name! prefix="undefined" expectedPrefix="prefix ", rediskey="invalid"` ,
75
+ `Malformed stream name! expectedRedisPrefix="y ", rediskey="invalid"` ,
76
76
) ;
77
77
} ) ;
78
78
} ) ;
79
79
80
80
describe ( 'when the rediskey is well formed' , ( ) => {
81
81
it ( 'returns the expected values' , ( ) => {
82
- const rediskey = 'prefix :room:room:docid' ;
83
- const expectedPrefix = 'prefix ' ;
82
+ const rediskey = 'y :room:room:docid' ;
83
+ const expectedPrefix = 'y ' ;
84
84
85
85
const result = decodeRedisRoomStreamName ( rediskey , expectedPrefix ) ;
86
86
@@ -91,10 +91,10 @@ describe('helper', () => {
91
91
describe ( 'when the prefix does not match' , ( ) => {
92
92
it ( 'throws an error' , ( ) => {
93
93
const rediskey = 'invalid:room:room:docid' ;
94
- const expectedPrefix = 'prefix ' ;
94
+ const expectedPrefix = 'y ' ;
95
95
96
96
expect ( ( ) => decodeRedisRoomStreamName ( rediskey , expectedPrefix ) ) . toThrow (
97
- `Malformed stream name! prefix="invalid" expectedPrefix="prefix ", rediskey="invalid:room:room:docid"` ,
97
+ `Malformed stream name! expectedRedisPrefix="y ", rediskey="invalid:room:room:docid"` ,
98
98
) ;
99
99
} ) ;
100
100
} ) ;
0 commit comments