import test from 'japa' ; import { ShieldMiddleware } from '../src/ShieldMiddleware' ; import { setup , fs } from '../test-helpers' ; test . group ( 'Shield Provider' , ( group ) => { group . afterEach ( async ( ) => { await fs . cleanup ( ) ; } ) ; test ( 'register shield provider' , async ( assert ) => { const app = await setup ( ) ; assert . deepEqual ( app . container . use ( 'Adonis/Addons/Shield' ) , ShieldMiddleware ) ; } ) ; test ( 'make shield middleware instance via container' , async ( assert ) => { const app = await setup ( ) ; assert . instanceOf ( app . container . make ( app . container . use ( 'Adonis/Addons/Shield' ) ) , ShieldMiddleware ) ; } ) ; } ) ;