File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ const tick = require('../common/tick');
1919const assert = require ( 'node:assert' ) ;
2020const tmpDir = tmpdir . path ;
2121
22+ const skipMessage = 'intensive toString tests due to memory confinements' ;
23+ if ( ! common . enoughTestMem )
24+ common . skip ( skipMessage ) ;
25+
2226tmpdir . refresh ( ) ;
2327
2428async function validateReadFile ( ) {
@@ -40,6 +44,11 @@ async function validateLargeFileSupport() {
4044 const LARGE_FILE_SIZE = 2147483647 + 10 * 1024 * 1024 ; // INT32_MAX + 10 MB
4145 const FILE_PATH = path . join ( os . tmpdir ( ) , 'large-virtual-file.bin' ) ;
4246
47+ if ( ! tmpDir . hasEnoughSpace ( LARGE_FILE_SIZE ) ) {
48+ common . printSkipMessage ( `Not enough space in ${ os . tmpdir ( ) } ` ) ;
49+ return ;
50+ }
51+
4352 function createVirtualLargeFile ( ) {
4453 return Buffer . alloc ( LARGE_FILE_SIZE , 'A' ) ;
4554 }
You can’t perform that action at this time.
0 commit comments