test: make tests work on non-English locales (#2736)

`Data.prototype.toString` may return non-ASCII characters, which aren't accepted by `setHeader`.

E.g., on Russian locale, it might look like this:
```
> new Date().toString()
'Thu Jun 14 2018 13:11:50 GMT+0300 (Финляндия (лето))'
```
This commit is contained in:
Georgii Dolzhykov 2018-06-14 20:18:02 +03:00 committed by Andrey Lushnikov
parent 1875cb4877
commit 93e128931f

View File

@ -221,7 +221,7 @@ class SimpleServer {
return;
}
response.setHeader('Cache-Control', 'public, max-age=31536000');
response.setHeader('Last-Modified', this._startTime.toString());
response.setHeader('Last-Modified', this._startTime.toISOString());
} else {
response.setHeader('Cache-Control', 'no-cache, no-store');
}