This commit is contained in:
		| @@ -5,7 +5,7 @@ | ||||
|  * Created by Timo Hocker <timo@scode.ovh>, December 2020 | ||||
|  */ | ||||
|  | ||||
| import blacklist from '../../lib/Blacklist'; | ||||
| import blacklist, { Blacklist } from '../../lib/Blacklist'; | ||||
| import { clock_finalize, clock_setup } from '../Helper'; | ||||
|  | ||||
| // eslint-disable-next-line max-lines-per-function | ||||
| @@ -60,4 +60,16 @@ describe ('blacklist', () => { | ||||
|     expect (blacklist.is_valid ('baz')) | ||||
|       .toBeFalse (); | ||||
|   }); | ||||
|  | ||||
|   it ('should export and import data', () => { | ||||
|     const exp = blacklist.export_blacklist (); | ||||
|     // eslint-disable-next-line dot-notation | ||||
|     expect (blacklist['_signatures']) | ||||
|       .toEqual (exp); | ||||
|     const bl2 = (new Blacklist); | ||||
|     bl2.import_blacklist (exp); | ||||
|     // eslint-disable-next-line dot-notation | ||||
|     expect (bl2['_signatures']) | ||||
|       .toEqual (exp); | ||||
|   }); | ||||
| }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user