import { FileSystem } from '../FileSystem' ; import { PosixModeBits } from '../PosixModeBits' ; test ( 'PosixModeBits tests' , ( ) => { let modeBits = PosixModeBits . AllRead | PosixModeBits . AllWrite ; expect ( FileSystem . formatPosixModeBits ( modeBits ) ) . toEqual ( '-rw-rw-rw-' ) ; modeBits |= PosixModeBits . GroupExecute ; expect ( FileSystem . formatPosixModeBits ( modeBits ) ) . toEqual ( '-rw-rwxrw-' ) ; modeBits |= PosixModeBits . OthersExecute ; expect ( FileSystem . formatPosixModeBits ( modeBits ) ) . toEqual ( '-rw-rwxrwx' ) ; modeBits &= ~ PosixModeBits . AllWrite ; expect ( FileSystem . formatPosixModeBits ( modeBits ) ) . toEqual ( '-r--r-xr-x' ) ; } ) ;