Remove -Force from Import-Module in tests

This commit is contained in:
Sergei Vorobev
2017-01-12 14:25:07 -08:00
committed by Jason Shirk
parent ab06adf774
commit fab25c5d50
6 changed files with 6 additions and 6 deletions
@@ -1,7 +1,7 @@
#
# Copyright (c) Microsoft Corporation, 2014
#
Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 -force
Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1
Describe 'Positive Parse Properties Tests' -Tags "CI" {
It 'PositiveParsePropertiesTest' {
@@ -1,4 +1,4 @@
Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 -force
Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1
set-strictmode -v 2
@@ -34,7 +34,7 @@ Describe "Breakpoints when set should be hit" -tag "CI" {
Describe "It should be possible to reset runspace debugging" -tag "Feature" {
BeforeAll {
import-module $helperModule -force
import-module $helperModule
$path = setup -pass -f TestScript_2.ps1 -content $script2
$scriptPath = "$testdrive/TestScript_2.ps1"
$iss = [initialsessionstate]::CreateDefault2();
@@ -5,7 +5,7 @@ $helperModule = join-path $common Test.Helpers.psm1
Describe 'native commands lifecycle' -tags 'Feature' {
BeforeAll {
Import-Module $helperModule -force
Import-Module $helperModule
$powershell = Join-Path -Path $PsHome -ChildPath "powershell"
}
@@ -71,7 +71,7 @@ $PSVersionTable
$env:PSModulePath
Get-Module -ListAvailable -Name PackageManagement, PowerShellGet
Import-Module PackageManagement -force -verbose
Import-Module PackageManagement -verbose
Get-PackageProvider -ListAvailable
$repo = Get-PSRepository -ErrorAction SilentlyContinue |
@@ -59,7 +59,7 @@ try
Write-LogPassThru -Message "Expansion complete."
Import-Module "$openCoverPath\OpenCover" -force
Import-Module "$openCoverPath\OpenCover"
Install-OpenCover -TargetDirectory $openCoverTargetDirectory -force
Write-LogPassThru -Message "OpenCover installed."