diff --git a/types/hapi/v17/hapi-tests.ts b/types/hapi/v17/hapi-tests.ts deleted file mode 100644 index 06e2cdf175..0000000000 --- a/types/hapi/v17/hapi-tests.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {Server, ServerOptions} from "hapi"; - -const options:ServerOptions = { - port: 8000 -} - -const server = new Server(options); -server.start(); - -console.log('Server started at: ' + server.info.uri); - - diff --git a/types/hapi/v17/test/getting-started/01-creating-a-server.ts b/types/hapi/v17/test/getting-started/01-creating-a-server.ts new file mode 100644 index 0000000000..b45aca4564 --- /dev/null +++ b/types/hapi/v17/test/getting-started/01-creating-a-server.ts @@ -0,0 +1,11 @@ +// From https://hapijs.com/tutorials/getting-started#creating-a-server +import { Server, ServerOptions } from 'hapi'; + +const options: ServerOptions = { + port: 8000, +}; + +const server = new Server(options); +server.start(); + +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi/v17/test/index.test.d.ts b/types/hapi/v17/test/index.test.d.ts new file mode 100644 index 0000000000..ce156ebbdb --- /dev/null +++ b/types/hapi/v17/test/index.test.d.ts @@ -0,0 +1,12 @@ +// Type definitions for hapi 17.0 +// Project: https://github.com/hapijs/hapi +// Definitions by: Marc Bornträger +// Rafael Souza Fijalkowski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// Note/Disclaimer: None. + +/// + +/** Getting Started */ +export * from './getting-started/01-creating-a-server'; diff --git a/types/hapi/v17/tsconfig.json b/types/hapi/v17/tsconfig.json index 216332b184..8ce2562c61 100644 --- a/types/hapi/v17/tsconfig.json +++ b/types/hapi/v17/tsconfig.json @@ -23,6 +23,6 @@ }, "files": [ "index.d.ts", - "hapi-tests.ts" + "test/index.test.d.ts" ] }