We provide generalized least-squares (GLS) detrended versions of single-equation static regression or residuals-based tests for testing whether or not non-stationary time series are cointegrated. Our approach is to consider nearly optimal tests for unit roots and to apply them in the cointegration context. We derive the local asymptotic power functions of all tests considered for a triangular data-generating process, imposing a directional restriction such that the regressors are pure integrated processes. Our GLS versions of the tests do indeed provide substantial power improvements over their ordinary least-squares counterparts. Simulations show that the gains in power are important and stable across various configurations