We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e43c097 commit c2a13f1Copy full SHA for c2a13f1
test/Truncate.js
@@ -127,6 +127,12 @@ describe('<Truncate />', () => {
127
'getBoundingClientRect', () => ({ width })
128
);
129
130
+ sinon.stub(Truncate.prototype,
131
+ 'measureWidth', text => {
132
+ return measureWidth(text);
133
+ }
134
+ );
135
+
136
// Approximate .offsetWidth
137
sinon.stub(Truncate.prototype,
138
'ellipsisWidth', node => {
@@ -138,6 +144,7 @@ describe('<Truncate />', () => {
144
after(() => {
139
145
global.window.HTMLDivElement.prototype.getBoundingClientRect.restore();
140
146
147
+ Truncate.prototype.measureWidth.restore();
141
148
Truncate.prototype.ellipsisWidth.restore();
142
149
});
143
150
0 commit comments