You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chai.expect(convertToObjectId.bind(convertToObjectId,'Hello world!')).to.throw('The provided SID is not an Entra ID SID!');
70
+
expect(convertToObjectId.bind(convertToObjectId,'Hello world!')).to.throw('The provided SID is not an Entra ID SID!');
71
71
72
72
// Finish testing section
73
73
done();
74
74
});
75
75
76
76
it('Reject Invalid Type - Invalid SID',(done)=>{
77
77
// Test Junk String input
78
-
chai.expect(convertToObjectId.bind(convertToObjectId,'S-1-5-711957920-1182741761-3248840125-1169651596')).to.throw('The provided SID is not an Entra ID SID!');
78
+
expect(convertToObjectId.bind(convertToObjectId,'S-1-5-711957920-1182741761-3248840125-1169651596')).to.throw('The provided SID is not an Entra ID SID!');
79
79
80
80
// Finish testing section
81
81
done();
82
82
});
83
83
84
84
it('Reject Invalid Type - Number',(done)=>{
85
85
// @ts-expect-error Test number input
86
-
chai.expect(convertToObjectId.bind(convertToObjectId,123456)).to.throw('The provided sid is not a string!');
86
+
expect(convertToObjectId.bind(convertToObjectId,123456)).to.throw('The provided sid is not a string!');
87
87
88
88
// Finish testing section
89
89
done();
90
90
});
91
91
92
92
it('Reject Invalid Type - Boolean',(done)=>{
93
93
// @ts-expect-error Test boolean input
94
-
chai.expect(convertToObjectId.bind(convertToObjectId,true)).to.throw('The provided sid is not a string!');
94
+
expect(convertToObjectId.bind(convertToObjectId,true)).to.throw('The provided sid is not a string!');
95
95
96
96
// Finish testing section
97
97
done();
98
98
});
99
99
100
100
it('Reject Invalid Type - Regex',(done)=>{
101
101
// @ts-expect-error Test Regex input
102
-
chai.expect(convertToObjectId.bind(convertToObjectId,/^something$/gum)).to.throw('The provided sid is not a string!');
102
+
expect(convertToObjectId.bind(convertToObjectId,/^something$/gum)).to.throw('The provided sid is not a string!');
103
103
104
104
// Finish testing section
105
105
done();
106
106
});
107
107
108
108
it('Reject Invalid Type - Function',(done)=>{
109
109
// @ts-expect-error Test Function input
110
-
chai.expect(convertToObjectId.bind(convertToObjectId,()=>true)).to.throw('The provided sid is not a string!');
110
+
expect(convertToObjectId.bind(convertToObjectId,()=>true)).to.throw('The provided sid is not a string!');
111
111
112
112
// Finish testing section
113
113
done();
114
114
});
115
115
116
116
it('Reject Invalid Type - Object',(done)=>{
117
117
// @ts-expect-error Test Function input
118
-
chai.expect(convertToObjectId.bind(convertToObjectId,{'hello': 'world!'})).to.throw('The provided sid is not a string!');
118
+
expect(convertToObjectId.bind(convertToObjectId,{'hello': 'world!'})).to.throw('The provided sid is not a string!');
0 commit comments