33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6- import { assert , should , expect } from "chai" ;
6+ import { assert , should } from "chai" ;
77import { SetBinaryAndGetPackage , GetPackagesFromVersion , modernNetVersion } from "../../src/omnisharp/OmnisharpPackageCreator" ;
88import { Package } from "../../src/packageManager/Package" ;
99import { testPackageJSON } from "./testAssets/testAssets" ;
@@ -29,26 +29,13 @@ suite("GetOmnisharpPackage : Output package depends on the input package and oth
2929 useFrameworkOptions . forEach ( ( useFramework ) => {
3030 const pathSuffix = useFramework ? '' : `-net${ modernNetVersion } ` ;
3131
32- test ( `Throws exception if version is empty useFramework: ${ useFramework } ` , ( ) => {
33- let testPackage = inputPackages . find ( element => ( element . platformId && element . platformId == "os-architecture" ) ) ;
34- let fn = function ( ) { SetBinaryAndGetPackage ( testPackage , useFramework , serverUrl , "" , installPath ) ; } ;
35- expect ( fn ) . to . throw ( 'Invalid version' ) ;
36- } ) ;
37-
38- test ( `Throws exception if version is null useFramework: ${ useFramework } ` , ( ) => {
39- let testPackage = inputPackages . find ( element => ( element . platformId && element . platformId == "os-architecture" ) ) ;
40- let fn = function ( ) { SetBinaryAndGetPackage ( testPackage , useFramework , serverUrl , null , installPath ) ; } ;
41- expect ( fn ) . to . throw ( 'Invalid version' ) ;
42- } ) ;
43-
44- test ( `Architectures, binaries and platforms do not change and fallback url is empty useFramework: ${ useFramework } ` , ( ) => {
32+ test ( `Architectures, binaries and platforms do not change useFramework: ${ useFramework } ` , ( ) => {
4533 let testPackage = inputPackages . find ( element => ( element . platformId && element . platformId == "os-architecture" ) ) ;
4634 let resultPackage = SetBinaryAndGetPackage ( testPackage , useFramework , serverUrl , version , installPath ) ;
4735
4836 resultPackage . architectures . should . equal ( testPackage . architectures ) ;
4937 assert . equal ( resultPackage . binaries , testPackage . binaries ) ;
5038 resultPackage . platforms . should . equal ( testPackage . platforms ) ;
51- expect ( resultPackage . fallbackUrl ) . to . be . undefined ;
5239 } ) ;
5340
5441 test ( `Version information is appended to the description useFramework: ${ useFramework } ` , ( ) => {
@@ -112,26 +99,8 @@ suite('GetPackagesFromVersion : Gets the experimental omnisharp packages from a
11299
113100 const serverUrl = "http://serverUrl" ;
114101 const installPath = "testPath" ;
115- let inputPackages : any ;
116-
117- suiteSetup ( ( ) => {
118- inputPackages = < Package [ ] > ( testPackageJSON . runtimeDependencies ) ;
119- should ( ) ;
120- } ) ;
121102
122103 [ true , false ] . forEach ( ( useFramework ) => {
123- test ( `Throws exception if the version is null (useFramework: ${ useFramework } )` , ( ) => {
124- let version : string = null ;
125- let fn = function ( ) { GetPackagesFromVersion ( version , useFramework , inputPackages , serverUrl , installPath ) ; } ;
126- expect ( fn ) . to . throw ( 'Invalid version' ) ;
127- } ) ;
128-
129- test ( `Throws exception if the version is empty (useFramework: ${ useFramework } )` , ( ) => {
130- let version = "" ;
131- let fn = function ( ) { GetPackagesFromVersion ( version , useFramework , inputPackages , serverUrl , installPath ) ; } ;
132- expect ( fn ) . to . throw ( 'Invalid version' ) ;
133- } ) ;
134-
135104 test ( 'Returns experiment packages with install test path depending on install path and version' , ( ) => {
136105 let inputPackages : Package [ ] = [
137106 {
0 commit comments