import test from 'ava' ; import { MenuTemplate } from '../../source/menu-template' ; test ( 'interaction doFunc' , t => { const menu = new MenuTemplate ( 'whatever' ) ; t . throws ( ( ) => { menu . interact ( 'Button' , 'unique' , { doFunc : ( ) => { throw new Error ( 'dont call this function' ) ; } , } ) ; } , { message : /renamed to do/ , } ) ; } ) ; test ( 'select set' , t => { const menu = new MenuTemplate ( 'whatever' ) ; t . throws ( ( ) => { menu . select ( 'unique' , [ ] , { setFunc : ( ) => { throw new Error ( 'dont call this function' ) ; } , } ) ; } , { message : /renamed to/ } ) ; } ) ; test ( 'choose do' , t => { const menu = new MenuTemplate ( 'whatever' ) ; t . throws ( ( ) => { menu . choose ( 'unique' , [ ] , { doFunc : ( ) => { throw new Error ( 'dont call this function' ) ; } , } ) ; } , { message : /renamed to/ } ) ; } ) ; test ( 'select isSet' , t => { const menu = new MenuTemplate ( 'whatever' ) ; t . throws ( ( ) => { menu . select ( 'unique' , [ ] , { isSetFunc : ( ) => { throw new Error ( 'dont call this function' ) ; } , } ) ; } , { message : /renamed to/ } ) ; } ) ; test ( 'toggle set' , t => { const menu = new MenuTemplate ( 'whatever' ) ; t . throws ( ( ) => { menu . toggle ( 'Button' , 'unique' , { setFunc : ( ) => { throw new Error ( 'dont call this function' ) ; } , } ) ; } , { message : /renamed to/ } ) ; } ) ; test ( 'toggle isSet' , t => { const menu = new MenuTemplate ( 'whatever' ) ; t . throws ( ( ) => { menu . toggle ( 'Button' , 'unique' , { isSetFunc : ( ) => { throw new Error ( 'dont call this function' ) ; } , } ) ; } , { message : /renamed to/ } ) ; } ) ;